develooper Front page | perl.perl6.users | Postings from April 2018

awk?

Thread Next
From:
ToddAndMargo
Date:
April 13, 2018 10:01
Subject:
awk?
Message ID:
497d29eb-0f69-63cc-83b3-e92cb37bc3c6@zoho.com
Hi All,

How to I translate this to Perl 6?   I am looking to be able
to dig out the fourth (or any) data point.

<code>
#!bin/bash
$x=$(echo "total kB          180448    2980     112" | awk '{print $4}')
echo $x
</code>

2980


Many thanks,
-T

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About