I am trying to run a command in screen mode using the command
screen -dmS screen_name sed -i 's/a/b/'g some-file.txt
Nothing happens. When I put the same command in a script and run the command:
screen -dmS screen_name bash -c /path/to/script
It works. My question is, can I run a command in daemon mode without first having to put it in a script? Basically, I need this daemon feature because it helps in running several commands in parallel, by running several sed commands on large files in parallel by throwing each command on a separate screen daemon, which terminates automatically after the program finishes. Thanks