Fw: awk?


Begin forwarded message:

Date: Fri, 13 Apr 2018 13:31:12 +0300
From: Shlomi Fish <shlomif@shlomifish.org>
To: perl6-users@perl.org
Subject: Re: awk?


Hi Todd,

On Fri, 13 Apr 2018 03:00:22 -0700
ToddAndMargo <ToddAndMargo@zoho.com> wrote:

> echo "total kB          180448    2980     112" | awk '{print $4}')  

shlomif[Perl6]:$trunk$ echo "total kB          180448    2980     112" | perl6
-n -e 'say .split(/\s+/)[3]'

2980

shlomif[Perl6]:$trunk$ echo "total kB          180448    2980     112" | awk
'{print $4}'

2980

See https://docs.perl6.org/language/5to6-nutshell#-a and
http://perldoc.perl.org/perlrun.html .
0
shlomif
4/13/2018 10:44:33 AM
perl.perl6.users 1105 articles. 0 followers. Follow

0 Replies
70 Views

Similar Articles

[PageSpeed] 7

Reply: