Re: reading lines of a file in a shell script ?
- From: "atishay" <atishay.kumar@xxxxxxxxx>
- Date: 6 Jun 2006 10:25:47 -0700
Michael Tosch wrote:
atishay wrote:i agree, this ia another improvement possible in the script
oops small mistake in last mail
cat filename | \
while read currentline
do
echo $currentline
done
Alberto wrote:
I want to read 1 by 1 a line of a file in a bash shell script. What
could I do ?
I know I can see the file with eg. cat, but: what could I do to
"process" each line of the file ?
Thanks
Alberto
And why do you propose
cat filename | loop
when you can do
loop < filename
i would like to know what other expansions could the shell do when
?
Last but not least,
echo "$currentline"
should be "quoted", so shell does variable substitution but
no other expansions.
there is no quote(") ?
thanks/atishay
--
Michael Tosch @ hp : com
.
- Follow-Ups:
- Re: reading lines of a file in a shell script ?
- From: Chris F.A. Johnson
- Re: reading lines of a file in a shell script ?
- References:
- reading lines of a file in a shell script ?
- From: Alberto
- Re: reading lines of a file in a shell script ?
- From: atishay
- Re: reading lines of a file in a shell script ?
- From: Michael Tosch
- reading lines of a file in a shell script ?
- Prev by Date: Re: reading lines of a file in a shell script ?
- Next by Date: Re: reading lines of a file in a shell script ?
- Previous by thread: Re: reading lines of a file in a shell script ?
- Next by thread: Re: reading lines of a file in a shell script ?
- Index(es):
Relevant Pages
|