[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
shell program help wanted!
- From: "nw x" <xingnw_01 hotmail com>(by way of Cosmio - Internet Gateway <staff intergate ca>)
- To: redhat-install-list redhat com
- Subject: shell program help wanted!
- Date: Thu, 14 Sep 2000 17:17:44 -0700
Hi, there:
I don't think I am in the correct mailing list for this question, but I do
need help, so if anyone can answer my question, please help me.
My question is I have lots of files with long name under one directory and
I want to change the names of the file to temp0, temp1, temp2,...tempN,
etc. so I wrote the following shell code, but it didn't work (actually, I
don't know how to make the number at the file name temp?)
thanks in advances!
the code is:
set i=0
for file in `ls`
do
if [ -f $file ]; then
cp $file ./temp$i
if [ $? -ne 0 ]; then
echo "copy $file failed"
fi
fi
i = 'expr $i+1'
done
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
_______________________________________________
Redhat-install-list mailing list
Redhat-install-list redhat com
https://listman.redhat.com/mailman/listinfo/redhat-install-list
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]