Using the following command:nohup tail -f file | stdbuf -o0 awk '/string1/ && /string2/' > file &This creates data in my file which is what I want but this also gives me the following:[2] 13717[root@server]# nohup: ignoring input and redirecting stderr to stdoutFrom there I have to ctrl-c to get back to a prompt. What do I need to change to get back to a prompt?
How to get nohup to exit cleanly when using file redirect
background process;nohup
You actually have a prompt.  What is happening is that you are getting it before nohup reports its warnings about stdin and stdout.  If you type a command, it will run just as you would expect it to notwithstanding the visually unorthodox apparent expansion to your prompt.If this is truly offensive to your sensibilities, you can work around it with a subshell:$ (nohup stuff and things > logfile & ) > /dev/null 2>&1Alternatively, you can address the warnings.  You are being warned because you are not handling standard input and standard error.  If you handle them yourself, nohup has nothing to change and so it will be silent:$ nohup stuff and htings > logfile 2> errfile < /dev/null &If you do not want to capture standard error, you can use /dev/null for your error file; if you want it to go to the same place as standard output, you can use 2>&1.