Reputation: 3
I used the command screen
to issue a program MyProgram
as the following:
screen -dmL MyProgram
However, MyProgram
is supposed to get some inputs from the standard input if it is launched directly without screen
. So with screen
, can I let MyProgram
obtain the input from a file (as the standard input)? Or is there any other way of bypassing this problem?
Upvotes: 0
Views: 40
Reputation: 54583
You can use "any" command when invoking screen
. For example
screen -dmL sh -c "MyProgram <myFile"
will pass the complete command
MyProgram <myFile
to screen
.
Upvotes: 1