jayjaybigs
IS-IT--Management
Hi All,
I have about a number files in a directory like so:
hello.txt
hallo.txt
hullo.txt
hollo.txt
Mu aim is rename them as follows:
hello1.txt
hello2.txt
hello3.txt
hello4.txt
Here is my effort, but I am not getting any love with this script....
#! /bin/bsh
$LIST=`ls *.txt`
for file in $LIST
do
filename='echo $file |sed -e `s/*.sql/*txt/`'
mv $file $filename
done
Your help will be appreciated.
JJ
I have about a number files in a directory like so:
hello.txt
hallo.txt
hullo.txt
hollo.txt
Mu aim is rename them as follows:
hello1.txt
hello2.txt
hello3.txt
hello4.txt
Here is my effort, but I am not getting any love with this script....
#! /bin/bsh
$LIST=`ls *.txt`
for file in $LIST
do
filename='echo $file |sed -e `s/*.sql/*txt/`'
mv $file $filename
done
Your help will be appreciated.
JJ