| UNIX/Linux Forum Archives · Rules and Guidelines · Disclaimer |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| dmilks |
Posted: May 30 2005, 02:50 PM
|
|
Newbie ![]() Group: Members Posts: 1 Member No.: 1024 Joined: 30-May 05 |
Hi. I have a kornshell script that runs on a daily basis as a cron job. Part of what the script does is copy the folder contents from another server to the current server (server where KSH script is running).
I have a scp command, as follows: scp $REMOTE_HOST:$REMOTE_FILE_DIR/* $TMP_DIR How would I verify the connection to the "remote host"? In other words, I don't want to run the SCP command unless it can connect to the remote host. How would I do this? Thanks, - Dylan |
| fishsponge |
Posted: May 31 2005, 09:18 PM
|
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 679 Member No.: 1 Joined: 13-February 03 |
surely if it cannot connect to the remote host, the command won't run anyway...
|
![]() |
![]() ![]() ![]() |