English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

how to read contents from the file in unix shell script.plz help.
or give me a link to find it

2007-02-20 09:14:19 · 2 answers · asked by mary 2 in Computers & Internet Programming & Design

2 answers

#!/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< sample.dat
while read -ru3 DATALINE
do
LINENO=${LINENO}+1
echo "${LINENO}\t${DATALINE}"
done
IFS=${OLDIFS}
# end of script

2007-02-20 09:23:15 · answer #1 · answered by SteveN 7 · 0 0

I examine this two times. the type you layer longer tale-appropriate prose is admirable, and a few thing I even have lots hassle with. you're making it seem user-friendly, organic, yet all individuals who write understand the alternative is actual. I regularly degree the effectiveness of slightly via the form of TD's........Jealousy rears this is eco-friendly head. Kudos to you, Mr Carney.

2016-10-02 11:20:46 · answer #2 · answered by ? 4 · 0 0

fedest.com, questions and answers