I’d like to provide feedback for my pinger program via the command line and view it using ps ax.
I found a SO q. But
....
ARGV[0] = "Hello!" # does nothing
I’m starting the script via ruby ./pinger
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assign to
$0instead. For example, if I startirbandand then over in
irb:and back to the other terminal:
You can check with this tiny script as well:
Run that, jump to another terminal, do a
ps | grep pancakes, and you should see a pancakes process.