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 -->
  #1 (permalink)  
Old 03-18-2008
antointoronto antointoronto is offline
Registered User
 

Join Date: Mar 2008
Posts: 24
rename multiple files

Hi,

can anyone have a ksh script to rename multiple files (ie to remove .Z extension of the files)

can someone correct this?

for i in *.Z
do
var1 = substr($i, 1,at(".Z",$i)-1)
mv $i $var1
done

Thanks..
Antony
Reply With Quote
Remove advertisements
!!
Forum Sponsor