Hello to everyone. I'm trying to execute a script which on unix works perfect but when i try to run it in redhat linux it doesn't work correctly. One of the main problems is that it doesn't seem to understand the wildcards. The scripts goes like that :
#!/bin/sh
testdir=/home/george/testdir/
.
.
.
for rep in /home/george/test*
do
mv ${rep} ${testdir}
echo ${rep}
done
Although the folder /home/george has many files like test*
it moves none and it prints on screen "/home/george/test*" , which means that it goes once in the for loop and then nothing. Anybody knows what i can do to solve this problem?
Thanks anyway
#!/bin/sh
testdir=/home/george/testdir/
.
.
.
for rep in /home/george/test*
do
mv ${rep} ${testdir}
echo ${rep}
done
Although the folder /home/george has many files like test*
it moves none and it prints on screen "/home/george/test*" , which means that it goes once in the for loop and then nothing. Anybody knows what i can do to solve this problem?
Thanks anyway