Quote:
Originally Posted by G-Fox
Hello,
try to do:
screen -dmS test 'ls > result.txt'
no result.txt file created...
If I put command 'ls > result.txt' in shell script test.sh and run:
screen -dmS test ./test.sh
result.txt file was created and have list of files, but I need to work without shell script.
|
Try to use double quotes instead. I can't be sure it will work, it really depends on how screen does the parsing of the input. But it's worth a try.
Code:
screen -dmS test "ls > ~/result.txt"
Quote:
My main task is to run multiple perl scripts from php web site in bacground and display perl script output in web without hangup or waiting for script to finish.
If someone have better solution than screen it will be very wellcome.
|
I am not sure this is the right approach, never looked into it myself. But there must be some tty library that you can use instead, like vte. In any case, if you prefer a terminal multiplexer for some reason, you should look into tmux which should be lighter. That's one thing to try if no one can give a better advise.