i have users home directories in /home
all the users have some files starting with character e
and i want to copy all these files in a folder in my (root) home
using a script
i tried the script
for i in m5[01-48]
do
cd m5[01-48]
cp e1* /home/pc/exam
cd ..
done
but get these errors
./cpex: line 3: cd: m5[01-48]: No such file or directory
cp: cannot stat `e1*': No such file or directory