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

Word-boundary mawk Debian Stretch



Hi,

With gawk I'm able to do the following:

$ gawk -v pattern=try '$0 ~ "\\<"pattern"\\>"{getline;print $2}'
~/.ssh/config
~/.ssh/try/id_rsa

$ cat ~/.ssh/config
Host try
IdentityFile ~/.ssh/try/id_rsa

I don't want to install extra pkgs on Debian Stretch (9).
Googling around didn't turn out something useful.

Does anyone has any idea on how I can emulate the above using  mawk?

-- 
John Doe


Reply to: