I have
# Transfer today's CMS backup to a remote backup server
scp -P 55 -r $localdumpdirectory/dirdump-cms-`date +%Y%m%d`.tar.gz root@someserver:/$remotedumpdirectory/ >/dev/null 2>&1
status=${$}
if [[ ${status} != 0 ]]
then
echo "Failed to secure copy directory, with code: ${status}"
exit 1
fi;
Everything is working except that even though the SCP succeeds, I get:
Failed to secure copy directory, with code: 27348
Ideas?
Exit code is
$?, not$$.$$is process ID.should be
If this is bash, see the section “Special Parameters” in the documentation.