01-25-06 01:38 PM
On Wed, 25 Jan 2006 13:38:11 +0100, John Eley wrote:
> Hi all
>
> I have a CF card in a PCI adapter.
> The card is given a name by the camera:
>
> NIKON D70
>
> This is ok from the command line:
>
> ls -l /Volumes/NIKON\ D70
> total 32
> drwxrwxrwx 1 jeley jeley 8192 Jan 25 12:14 DCIM
>
>
> But doesn't seem to work from a script:
>
> #!/bin/sh
> SRC='/Volumes/NIKON\ D70/DCIM/100NCD70/'
>
> cp -Rv $SRC $DEST
Leaving a variable unquoted has a very special meaning for the
shell. You should never do that unless you know what you're
doing and why.
cp -Rv -- "$SRC" "$DEST"
--
Stephane
[ Post a follow-up to this message ]
|