Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SIGTTIN problem with rsh in nohup

Status
Not open for further replies.

raypru

Technical User
Apr 9, 2002
26
0
0
GB
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 "

 
Your target1=`rsh remoteserver ls - lrt has a space in it - could it be the problem ?????


Dickie Bird (:)-)))
 
You are right there is a space but I think this has occurred when cutting and pasting into this forum because the script I am having problems with does not have the space. Thanks for your input.
 
What about the write_to_log script ?
Anything odd there ?????

Dickie Bird (:)-)))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top