[Cialug] Regex Question

Todd Walton tdwalton at gmail.com
Fri Oct 12 18:29:12 UTC 2018


On Fri, Oct 12, 2018 at 1:43 PM Tim Wilson <tim_linux at wilson-home.com>
wrote:

> Does it have to be regex? I have a short awk script that should work:
>
> awk ā€˜{if(NF > 1) {printf ā€œ%-9s %s %s\nā€, $1, $2, $3} else {print $1}}ā€™
> <foo.txt
>

Nice.

Also, jim, I don't use Perl or JavaScript. I know, I know, heresy. Turn in
my sysadmin card. Etc.

--
Todd


More information about the Cialug mailing list