#!/bin/ksh
# If Else reference
FILES=./*.txt
for f in $FILES
do
echo "Processing $f file..."
# take action on each file. $f store current file name
let i=1
tail -r $f | while read line;
do
echo $line
let j=i+1
i=j
if [[ $j != 10 ]]
then echo "value of j $j"
fi
done
done
No comments:
Post a Comment