The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
rename multiple files
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
rename multiple files
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
1
(
permalink
)
03-18-2008
antointoronto
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
Remove advertisements
The UNIX and Linux Forums
!!
Forum Sponsor
antointoronto
View Public Profile
Find all posts by antointoronto