On 08/04/2017 08:14 PM, Timo Paulssen wrote:
ifconfig | perl6 -e 'lines.grep("flags").map(*.words[0]).sort[1].chop'
this should do the trick. i'm not sure if 2,2p is meant to "output just
the second result" and if it's okay to just unconditionally remove the
last character.
hth
- Timo
2,2p means to print only the second line
$ ifconfig | /usr/bin/perl6 -e
'lines.grep("flags").map(*.words[0]).sort[1].chop'
Use of Nil in string context
in block <unit> at -e line 1
:'(
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~