$ tail -f /logs/filename.log | awk '!(/list)'
I am able to run this command in GNU Linux flavour
But when I written in a script it is not working.
test.ksh:
variable="/logs/filename.log | awk '!(/list)'"
tail -f $var
Getting the error as
tail: cannot open `|' for reading: No such file or directory
tail: cannot open `grep' for reading: No such file or directory
tail: cannot open `list' for reading: No such file or directory
How is need to work on this? Can anyone guide on this?
awkcode has syntax error.eval, but that's generally not advised.