Skip to main content
Errors on stderr
Source Link
Stéphane Chazelas
  • 584.6k
  • 96
  • 1.1k
  • 1.7k

Use if on its own, and quote the argument containing the glob intended for scp:

if ! /usr/bin/scp '[email protected]:/Users/seamus/Downloads/imgutils/image-utils*' /home/pi/testscp; then
    printfprintf>&2 "\nERROR & EXIT: 'scp' failed \n"
    exit 1
fi
printf "success!\n"

Use if on its own, and quote the argument containing the glob intended for scp:

if ! /usr/bin/scp '[email protected]:/Users/seamus/Downloads/imgutils/image-utils*' /home/pi/testscp; then
    printf "\nERROR & EXIT: 'scp' failed \n"
    exit 1
fi
printf "success!\n"

Use if on its own, and quote the argument containing the glob intended for scp:

if ! /usr/bin/scp '[email protected]:/Users/seamus/Downloads/imgutils/image-utils*' /home/pi/testscp; then
    printf>&2 "\nERROR & EXIT: 'scp' failed \n"
    exit 1
fi
printf "success!\n"
Source Link
Stephen Kitt
  • 480.9k
  • 59
  • 1.2k
  • 1.4k

Use if on its own, and quote the argument containing the glob intended for scp:

if ! /usr/bin/scp '[email protected]:/Users/seamus/Downloads/imgutils/image-utils*' /home/pi/testscp; then
    printf "\nERROR & EXIT: 'scp' failed \n"
    exit 1
fi
printf "success!\n"