Hi,
I have a tab seperated file with a number of lines in the following format :
file1 c:/some dir/temp c:/some other dir/temp
I'm trring to write a script in MKS toolkit as follows
while read filename sourcedir destdir
do
cp ${sourcedir}/${filename} ${destdir}
done < file
simple enough, except that sourcepath and destpath have spaces in the directory names and therefore I get an error.
Does anybody have any ideas how to handle teh spaces in the path names with the read command.
Thanks,
M
I have a tab seperated file with a number of lines in the following format :
file1 c:/some dir/temp c:/some other dir/temp
I'm trring to write a script in MKS toolkit as follows
while read filename sourcedir destdir
do
cp ${sourcedir}/${filename} ${destdir}
done < file
simple enough, except that sourcepath and destpath have spaces in the directory names and therefore I get an error.
Does anybody have any ideas how to handle teh spaces in the path names with the read command.
Thanks,
M