bash cp problem
Hi
I want to get rid of possible ampersands in files in a certain directory with
sed. As i know so far i have to use the original file then write to a second
file. As i want the original name i have to rename the generated files
afterwards. That is what i am basically trying to do. Probabely i commit a
mistake by naming files or variables. I am back to trial an error and as not
succesfull requesting for .
Part of the script...
....
pfad2="/home/peter/rss-urteile/bge-2000/entscheide/"
kurt="/home/peter/rss-urteile/bge-2000/entscheide/susi"
....
cd $pfad2;
for gulu in $pfad2"*[[:digit:]]"; do cp $gulu $kurt; sed 's/\&/∓/g' $kurt >
$gulu; rm /home/peter/rss-urteile/bge-2000/entscheide/susi; done
....
The following errors are produced:
cp: `/home/peter/rss-urteile/bge-2000/entscheide/susi': specified destination
directory does not exist
Try `cp --' for more information.
../zza.sh: line 61: $gulu: ambiguous redirect
rm: cannot remove `/home/peter/rss-urteile/bge-2000/entscheide/susi': No such
file or directory
Any is appreciated.
Thanks.
Peter Guyan, Chur
|