The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-02-2008
varungupta varungupta is offline
Registered User
 

Join Date: Feb 2007
Location: Pune, Dehradun (INDIA), Michigan(US)
Posts: 187
Code Understand ?

Hey,

Could you explain me what this code is doing ?
For example:
Code:
$i has value 9
$1 is the name of the file say FILEBkUp

    while [ "$i" != "1" ]
    do
      if [ -f $1.`/bin/expr $i - 1` ]
      then
        mv -f $1.`/bin/expr $i - 1` $1.$i
      fi
      i=`/bin/expr $i - 1`
    done
Thanks in Advance !
Varun
Reply With Quote
Forum Sponsor