home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!munnari.oz.au!hp9000.csc.cuhk.hk!cucs5.cs.cuhk.hk!fan1321
- From: fan1321@cs.cuhk.hk (George Fan )
- Subject: Re: Problem with ksh read built-in parsing
- Message-ID: <1993Jan21.132049.23160@cucs5.cs.cuhk.hk>
- Keywords: ksh, read, parsing
- Sender: news@cucs5.cs.cuhk.hk
- Organization: Faculty of Engineering, The Chinese U. of Hong Kong
- References: <C1488r.HM1@boi.hp.com>
- Date: Thu, 21 Jan 1993 13:20:49 GMT
- Lines: 40
-
- donp@mail.boi.hp.com (Don Peterson) writes:
-
-
- >I am using ksh on HPUX 8.0 and I've run into a feature of the read
- >command that makes my script run incorrectly.
-
- >So my question is: Is there another command in ksh that simulates
- >the read command, but doesn't do the whitespace stripping and parsing
- >(if indicated).
-
- >Here's what I mean. I have the following line in my script:
-
- > read -u3 LINE
-
- >(File descriptor 3 was opened earlier).
-
- >Let's say the line I wanted to input was:
-
- >" This is a test line for the script."
-
- >where the line does not include the quotes, but all spaces are important.
-
- >What I get back when I use echo $LINE is:
-
- Please, Try echo "$Line" (i.e with the quote )
-
- >This is a test line for the script.
-
- >i.e., the leading spaces have been removed. Is there a way to
- >avoid this and get the whole line printed?
-
- >Please email responses to me at donp@hpbs1639.boi.hp.com and I'll
- >post a summary if there are enough responses.
-
- George Fan.
- --
- ---------------
- Email : fan1321@cs.cuhk.hk ( georgef@cuhk.hk )
- Home Phone: (825)356-1084
- .------------------------------------------------.
-