On Sun, 17 Jan 2021 11:48:55 +0000, Chris Elvidge wrote:
> On 16/01/2021 05:53 pm, Martin Gregorie wrote:
>> In fact I couldn't get the following to work at all:
>>
>> sudo journalctl -f | awk '{ print $0 }'
>
> Why would you use awk at all here? You're just (re)printing the input
> line.
I think that was just simple proof-of-concept test code to check that awk
was reading the journalctl output stream. Quite reasonable if you've
never user awk before.
> BTW the above works here - LMDE4, GNU awk 4.2
>
I don't recall needing the '--' in the "awk -- 'short awk prog'" command
before, but there seems to have been a bit of rationalisation going on. I
notice that now (Fedora 32) /usr/bin/awk is now a symlink pointing to /
usr/bin/gawk but don't know when that happened or which other distros do
the same.
--
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|