Quote:
Originally Posted by
King Nothing
Ideally what I would want is for the perl script to run there and then.
Please clarify, what would you like to do?
Quote:
Originally Posted by
King Nothing
You said that I need to get a signal from nohup in order to understand that the script is done with its execution. But how am I supposed to do so?
Not from nohup, you don't want to use nohup nor & when waiting for the perl process to end.
The perl script should output something on the standard output when its job is done; if it is completely silent, at least the remote shell should output a prompt. If you were to telnet manually you would see that output on your terminal screen. Since your shell script is using telnet, not you, it is your script that has to
read from the two-way pipe (|&) and decide if and when the perl script is finished.
Quote:
Originally Posted by
King Nothing
I also removed the & at the end so that it runs in the foreground only. But I could not see any file being created for nohup.out or any file that the called perl script should have created ...
Of course the file nohup.out is created on the remote machine, and more precisely in the current directory for the nohup process, and that directory happens to be the home dir of $USERID (since I see no cd commands).