Hi there,
I have a small issue with a script that I am running. I need it to ignore certain dir when copying over files. Ie the code is pointing towards the dir etest but I need to ignore the dirs INLINE and ENG which is contained within this...could anyone give me a pointer on how to do this? I already ignore one dir but how can this be done with multiples....
cheers
colin
cd /etest/
for dir in *; do
if [ "$dir" = "s25e3" ]; then
continue
fi
cp -p $dir/${dir}.prb $dir/${dir}.prb.backup
cp /path/to/s253e.prb $dir/${dir}.prb
done
I traced the scripty and also looked at the dir which i wanted to copy the backups to and they all contain the files that I need to copy. I know that i am going to the eol dir as the pwd command shows me...I am at a loss. I have checked the code to see if i have a full stop out of place but I cant see anything
I had put in the round bracket and made the change to the script as you suggested. The info that i get from the echo command is dir = "//" so it looks like the variable dir is empty. I tried this with the original script and the dir are changed. Is it something with the code that I am not doing right?