The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 09-06-2007
namishtiwari namishtiwari is offline
Registered User
 

Join Date: Aug 2007
Location: Bangalore
Posts: 288
or you can do something like this

for line in `cat $file`
do
line=`expr $line - 1`
echo $line
done

Thanks
Namish
Reply With Quote