home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / shell / 5459 < prev    next >
Encoding:
Text File  |  1993-01-22  |  1.6 KB  |  53 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!munnari.oz.au!hp9000.csc.cuhk.hk!cucs5.cs.cuhk.hk!fan1321
  3. From: fan1321@cs.cuhk.hk (George Fan )
  4. Subject: Re: Problem with ksh read built-in parsing
  5. Message-ID: <1993Jan21.132049.23160@cucs5.cs.cuhk.hk>
  6. Keywords: ksh, read, parsing
  7. Sender: news@cucs5.cs.cuhk.hk
  8. Organization: Faculty of Engineering, The Chinese U. of Hong Kong
  9. References: <C1488r.HM1@boi.hp.com>
  10. Date: Thu, 21 Jan 1993 13:20:49 GMT
  11. Lines: 40
  12.  
  13. donp@mail.boi.hp.com (Don Peterson) writes:
  14.  
  15.  
  16. >I am using ksh on HPUX 8.0 and I've run into a feature of the read
  17. >command that makes my script run incorrectly.  
  18.  
  19. >So my question is:  Is there another command in ksh that simulates 
  20. >the read command, but doesn't do the whitespace stripping and parsing 
  21. >(if indicated).
  22.  
  23. >Here's what I mean.  I have the following line in my script:
  24.  
  25. >   read -u3 LINE
  26.  
  27. >(File descriptor 3 was opened earlier).
  28.  
  29. >Let's say the line I wanted to input was:
  30.  
  31. >"    This is a test line for the script."
  32.  
  33. >where the line does not include the quotes, but all spaces are important.
  34.  
  35. >What I get back when I use echo $LINE is:
  36.  
  37.       Please, Try   echo "$Line"  (i.e with the quote )
  38.  
  39. >This is a test line for the script.
  40.  
  41. >i.e., the leading spaces have been removed.  Is there a way to 
  42. >avoid this and get the whole line printed?
  43.  
  44. >Please email responses to me at donp@hpbs1639.boi.hp.com and I'll
  45. >post a summary if there are enough responses.
  46.  
  47. George Fan.
  48. --
  49. ---------------
  50. Email : fan1321@cs.cuhk.hk ( georgef@cuhk.hk )
  51. Home Phone: (825)356-1084
  52.     .------------------------------------------------.
  53.