In a script, I got the following code from a ksh script :
for log_file in `cat a_filename`
do
`echo mv from_directory/$log_file to_directory`
done
Could the code be
for log_file in `cat a_filename`
do
mv "from_directory/$log_file" to_directory
done
instead ?
What is the plus-value of using echo with backtick ?
ksh
script. Some older versions ofksh
do not support the$( ..,)
syntax. – fpmurphy Sep 06 '17 at 03:54ksh88
), then I'd be extremely worried about what else on the system has not been updated. – Kusalananda Sep 06 '17 at 06:01