script question
- From: "Mike" <michael.h.williamson@xxxxxxxxx>
- Date: 23 Mar 2007 14:04:29 -0700
containing the word "END".From a script, I want to print all the lines of a file up to a line
Something like:
# grep -avw -m 1 "END" -f bla.txt
or
# cat bla.txt | while read line; do
echo $line
if [ "$line" == "END" ]; then break; fi
done
....except a script that actually works. The second one above does not
work because
the "read line" corrupts the lines by removing whitespace. I don't
know why the
first one doesn't work.
-Mike
.
- Follow-Ups:
- Re: script question
- From: Stephane CHAZELAS
- Re: script question
- From: Chris F.A. Johnson
- Re: script question
- From: Ed Morton
- Re: script question
- From: John Gordon
- Re: script question
- Prev by Date: Re: mtree / calendar for linux?
- Next by Date: Re: script question
- Previous by thread: mtree / calendar for linux?
- Next by thread: Re: script question
- Index(es):
Relevant Pages
|