<quote who="Stewart">
> for each $line in $textfile do
> something
cat <file> | while read LINE; do
echo $LINE;
done
or,
while read LINE; do
echo $LINE;
done < <file>
> but i can't work out the syntax. $1 is the input stream isn't it?
> that's about as far as i got. .. :-(
$1 is the first parameter given to the shell script:
$ cat myshell
#!/bin/sh
echo $0
echo $1
echo $2
echo $3
$ ./myshell pants tshirt suspenders
./myshell
pants
tshirt
suspenders
- Jeff
--
"This is the new dividing line in public life. It is not a question of
Left versus Right, but a struggle between insiders and outsiders." -
Mark Latham
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug