I want to write a shell script that sends code (let's say RBScript code) to
my console app. Let's say my script looks like this:
#!/usr/bin/myapp
print str( 3 )
My app loops through stdin.ReadLine until stdin.EOF is true, then tells
RBScript to execute the code if finds.
Try:
--------------------------------------------------
#!/bin/sh
/usr/bin/myapp <<END_OF_INPUT
print str( 3 )
END_OF_INPUT
--------------------------------------------------
and don't forget to:
chmod a+x <your script name>
This form runs your application (or any program) reading from the
script file as standard input until it matches the text after the
"<<".
Craig
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|