Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: rsh (remote shell) help

by Ras (Acolyte)
on May 11, 2001 at 23:14 UTC ( [id://79818]=note: print w/replies, xml ) Need Help??


in reply to Re: rsh (remote shell) help
in thread rsh (remote shell) help

This is what i'm doning:
rsh dgintel1 /bb/bin/kin.css

the task kin.css contains:
echo inside kin.css
/bb/bin/kin.css.wait

the task kin.css.wait contains:
echo running kin.css.wait &
sleep 10
touch kin.done
echo finised running kin.css.wait

As you can see i'm kicking off kin.css which kicks off
kin.css.wait. I want to put kin.css.wait in the
background so i can get the prompt back to kick off another
rsh. The way i know this doesn't work is that
kin.done never gets touched.
Do you have any kind of suggestions.
Thanks in advance

Replies are listed 'Best First'.
Re: Re: Re: rsh (remote shell) help
by virtualsue (Vicar) on May 12, 2001 at 02:04 UTC
    I have no solution for you, but I do have some hints which may help. No warranties are expressed or implied. Read the man page for nohup(1), and also look at redirecting stdout and stderr on all scripts you run. This is something you should do in production anyway so that warnings and errors aren't missed. See the man page for rsh on your platform for more details (you may need the -n option).
Re: Re: Re: rsh (remote shell) help
by jepri (Parson) on May 12, 2001 at 07:14 UTC
    I can see two things you could be doing better: you are thinking like you are writing a program, rather than doing tricks with shell scripts, and you have the & in the wrong place (where you have it backgrounds the 'echo' command, not kin.css.wait) This is closer to what you want:

    ---file kin.css (on the remote computer, I assume) echo running kin.css; #Do your thing touch kin.done; echo Finished running kin.css; ---eof

    and now run it by typing on the local computer

    rsh dgintel1 /bb/bin/kin.css &

    Your problem was that your were backgrounding the wrong process on the wrong computer. If you want the local prompt back you have to background the local program - in this case rsh.

    ____________________
    Jeremy
    I didn't believe in evil until I dated it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://79818]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-03-28 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found