dplinnane
asked on
list directory with spaces shell script
or file in `ls`; do echo "cp -R $dir ./dir2/"; done
This works great except directories with spaces do not work as expected. For example directory name sales and returns
echoes
cp -R /dir1/sales /dir2/
cp -R/dir1/and /dir2/
cp -R /dir1/returns /dir2/
I should get
cp -R /dir1/sales and returns /dir2/
How do I stop directory names with spaces from being split?
I'll close the question after this (-: thanks all.
This works great except directories with spaces do not work as expected. For example directory name sales and returns
echoes
cp -R /dir1/sales /dir2/
cp -R/dir1/and /dir2/
cp -R /dir1/returns /dir2/
I should get
cp -R /dir1/sales and returns /dir2/
How do I stop directory names with spaces from being split?
I'll close the question after this (-: thanks all.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.