I can't find anywhere that addresses this, and I can't find a way to do it. I've got an app that I've written and I want to be able to call an app and pass it a script, and it works fine with it in a script file, but ideally I'd prefer to keep the script in the code and out of a file in readable (and easily screw-upable) form. Is there a way to pass a set of instructions to cmd like this, or is a temp file the only way?
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
The
You can group commands:
|
|||
|
|
It depends on the app that you're using. Many will have the ability to take the script commands directly on the command line, others will have the ability to take stdin directly as the script you want to run. You need to look at whatever user's guide there is for the specific app you're trying to invoke to figure out which method you need to use. If the app has no method except taking in a file, then barring some complex magic with file descriptor pipes that's way above my head (and far more complex than simply using a file) you're out of luck I'm afraid. |
|||
|
|