Quantcast
Channel: AWK split output with the line - Ask Ubuntu
Browsing all 3 articles
Browse latest View live

Answer by ReineS for AWK split output with the line

If you want the separator lines to be white:tail -f logfile.log | awk '/connected/ {print "\033[31m" $0 "\033[39m\n-----------------------------------"}'If you want the separator line to be red:tail -f...

View Article



Answer by muru for AWK split output with the line

If all you want to do is print ---------------------------------------------------------- after every line, set the ORS (output record separator) to whatever you want to come after every line:$ awk -v...

View Article

AWK split output with the line

How can I split output lines using tailf and awk like this?From this:tail -f logfile.log | awk '/connected/ {print "\033[31m" $0 "\033[39m"}'Output:2018-01-31 10:00 user connected autentication...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images