I am trying to code this command to run in screen along with 2 others that will be using cat
to read a file then pipe it into awk
for filtering. Here is the command;
screen -d -m /bin/cat /var/www/html/filter/unfiltered.txt | awk '{print $1}' > /var/www/html/filter/first.txt
If I check the screen that is detached I see it filtering the list, when it completes, the file first.txt
is created but empty. I saw something about using -L
in screen for an output log, but I want the output going to the same folder the non filtered list is in and called first.txt
, I cannot figure out why it will successfully run, but the output file is empty every time. If I run it without screen -d -m
the file created is not empty. I think I am missing something with the screen command. I just started using screen. I am not sure when else to post.