Re: bash cp problem
On Sat, 26 Aug 2006 16:47:06 +0200, Peter Guyan
<peter.guyan@tele_zwei_.ch> wrote:
>
>
> 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
Because you quoted the wildcard, it was expanded in the wrong place. cp
sees more than two arguments, so it expects the last argument to be a
directory.
> 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.
>
for gulu in $pfad2*[[:digit:]]
--
Still looking for the glorious results of my misspent youth. Say, do you
have a map to the next joint?
|