realbasic-nug
[Top] [All Lists]

Re: Creating an executable script

To: realbasic-nug at lists dot realsoftware dot com
Subject: Re: Creating an executable script
From: "Craig A. Finseth" <fin at finseth dot com>
Date: Tue, 28 Nov 2006 07:33:47 -0600 (CST)
Cc: realbasic-nug at lists dot realsoftware dot com
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <C1913DDA dot 814A3%ktekinay at mactechnologies dot com>
   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>


<Prev in Thread] Current Thread [Next in Thread>