[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Editing a piped in stream?



On Tue, Jul 10, 2018 at 01:16:09PM +0100, mick crane wrote:
> I'd like to learn some awk having found it handy once.
> apt says mawk is installed
> 
> in /usr/bin I have
> lrwxrwxrwx  1 root root         21 Apr  2 22:29 awk -> /etc/alternatives/awk
> -rwxr-xr-x  1 root root     658072 Jan 25 12:55 gawk
> -rwxr-xr-x  1 root root       3189 Jan 25 12:55 igawk
> -rwxr-xr-x  1 root root     121976 Mar 23  2012 mawk
> lrwxrwxrwx  1 root root         22 Apr  2 22:29 nawk ->
> /etc/alternatives/nawk
> 
> "awk" returns options for gawk and "mawk does nothing ( back to prompt)

So, what's the problem?

> how to run mawk ?

mawk

You have already run it once, with no arguments, and it did nothing.
Now try giving it some arguments.

wooledg:~$ mawk -v foo=bar 'BEGIN {print foo}'
bar

See, just like awk.


Reply to: