I am running a job using nohup which is hanging then exiting with a SIGTTIN message which I understand is where the program is waiting for some input. It looks like it does not like the rsh command although this works fine when I run from the command line. Can anyone explain what input this nohup command is expecting.
Basically, I am copying a file to a remote server and comparing the size of the source and target to ensure that the copy succeeds and write output to a log file.
The sample code is:
echo
echo "Copying /usr0/oradata/TEST/file1_TEST.dbf to /usr14/oradata/UAT/file1_UAT.dbf"
echo
rcp -p /usr0/oradata/TEST/file1_TEST.dbf remoteserver:/usr14/oradata/UAT/file1_UAT.dbf
source1=`ls -lrt /usr0/oradata/TEST/file1_TEST.dbf | awk -F" " '{print $5}'`
target1=`rsh remoteserver ls - lrt /usr14/oradata/UAT/file1_UAT.dbf | awk -F" " '{print $5}'`
if [ "${source1}" -eq "${target1}" -a "${source1}" -gt "0" ]
then
$HOME/write_to_log I $0 CT "/usr0/oradata/TEST/file1_TEST.dbf - copy successful "
else
$HOME/write_to_log E $0 CT "/usr0/oradata/TEST/file1_TEST.dbf - copy failed "
Basically, I am copying a file to a remote server and comparing the size of the source and target to ensure that the copy succeeds and write output to a log file.
The sample code is:
echo
echo "Copying /usr0/oradata/TEST/file1_TEST.dbf to /usr14/oradata/UAT/file1_UAT.dbf"
echo
rcp -p /usr0/oradata/TEST/file1_TEST.dbf remoteserver:/usr14/oradata/UAT/file1_UAT.dbf
source1=`ls -lrt /usr0/oradata/TEST/file1_TEST.dbf | awk -F" " '{print $5}'`
target1=`rsh remoteserver ls - lrt /usr14/oradata/UAT/file1_UAT.dbf | awk -F" " '{print $5}'`
if [ "${source1}" -eq "${target1}" -a "${source1}" -gt "0" ]
then
$HOME/write_to_log I $0 CT "/usr0/oradata/TEST/file1_TEST.dbf - copy successful "
else
$HOME/write_to_log E $0 CT "/usr0/oradata/TEST/file1_TEST.dbf - copy failed "