pillmill
asked on
shell script to reads lines of a file ?
The following script should read lines of the input file, but just
returns the file name. How do I get it to read the lines of the file,
one at a time ?
#! /bin/csh
set f = $1
foreach d ( $f )
echo $d
end
returns the file name. How do I get it to read the lines of the file,
one at a time ?
#! /bin/csh
set f = $1
foreach d ( $f )
echo $d
end
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
f=$1
while read d ; do
echo $d
done < $f