J
John Smith
I have the following hypothetical script that requires arguments to run.
The command line execution looks like this:
'ruby distance_traveled.rb 60 2.5'
The output would be the following:
'You have traveled a distance of 150 miles.'
How would I run the above execution from inside another script, and
capture the output above (the 150 miles portion at least)?
Thanks in advance!
The command line execution looks like this:
'ruby distance_traveled.rb 60 2.5'
The output would be the following:
'You have traveled a distance of 150 miles.'
How would I run the above execution from inside another script, and
capture the output above (the 150 miles portion at least)?
Thanks in advance!