how to read contents from the file in unix shell script.plz help.
or give me a link to find it
Unix shell script,read from file?
#!/bin/ksh
# This Korn script will read one line from a file
# and display it on the screen
#
OLDIFS=${IFS}
IFS="\n"
integer LINENO=0
exec 3%26lt; sample.dat
while read -ru3 DATALINE
do
LINENO=${LINENO}+1
echo "${LINENO}\t${DATALINE}"
done
IFS=${OLDIFS}
# end of script
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment