#!/usr/bin/ksh
echo "==start show detial content of input.dat==================="
cat input.dat
echo "==transfer each line of input.dat to a single output file==================="
let j=0
while read s
do
j=`expr $j + 1`
echo $j
echo $s
echo "input line=""$s" >>output$j.evt
done < input.dat
echo "===show all the output file=================="
ls *.evt
echo "==show detail info of each output file==================="
for i in `ls *.evt`
do
echo $i
cat $i
echo "====================="
rm $i
done
###############################################
==start show detial content of input.dat===================
able
binc
date
forg
==transfer each line of input.dat to a single output file===================
1
able
2
binc
3
date
4
forg
5
===show all the output file==================
output1.evt output2.evt output3.evt output4.evt output5.evt
==show detail info of each output file===================
output1.evt
input line=able
=====================
output2.evt
input line=binc
=====================
output3.evt
input line=date
=====================
output4.evt
input line=forg
=====================
output5.evt
input line=
=====================
#!/usr/bin/kshecho "==start show detial content of input.dat==================="cat input.datecho "==transfer each line of input.dat to a single output file==================="let j=0while read sdo j=`expr $j + 1` echo $j echo $s ...