home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!cs.utexas.edu!wupost!crcnis1.unl.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!usenet.ucs.indiana.edu!shutton
- From: shutton@fokker.union.indiana.edu (Scott K. Hutton)
- Subject: Re: Reading a line from a file in Bourne
- In-Reply-To: shutton@fokker.union.indiana.edu's message of Fri, 11 Dec 1992 16:29:20 GMT
- Message-ID: <SHUTTON.92Dec11223107@fokker.union.indiana.edu>
- Sender: news@usenet.ucs.indiana.edu (USENET News System)
- Nntp-Posting-Host: fokker.union.indiana.edu
- Organization: /nfs/bronze/usr2/shutton/.organization
- References: <SHUTTON.92Dec11112920@fokker.union.indiana.edu>
- Distribution: usa
- Date: Sat, 12 Dec 1992 03:31:07 GMT
- Lines: 15
-
- I've received a lot of good advice, both through e-mail and followups.
- The bottom line (while I did receive lots of innovative solutions) is
- to do something akin to the following:
-
- #!/bin/sh
- cat myfile |
- while read LINE
- do
- echo a full line: $LINE
- done
-
- "read" apparently has a significant return value--major goof on my
- part for failing to check this.
-
- -S
-