An XARGS question
Todd Zullinger
tmz at pobox.com
Tue Jul 18 21:45:47 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Dalloz wrote:
> Bill Rugolsky Jr. schrieb:
>
>>Others have directed you toward "xargs -i", which is correct,
>>but in this particular example, you can do something simpler,
>>
>> lastb -ai |fgrep "Jul 18" |awk '{print $10 }'|sort|uniq \
>> |fgrep -x -f - blacklist
>>
>>
>> Bill Rugolsky
>>
>>
>>
> Even shorter:
>
> lastb -ai | awk '/Jul 18/ {print $10}' | sort -u | fgrep -x -f - blacklist
Gotta love shell golf. ;-)
- --
Todd OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp
======================================================================
Things in our country run in spite of government, not by aid of it.
-- Will Rogers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (GNU/Linux)
Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl.
iG0EARECAC0FAkS9VosmGGh0dHA6Ly93d3cucG9ib3guY29tL350bXovcGdwL3Rt
ei5hc2MACgkQuv+09NZUB1pcPgCfY2jGF2uMZ7HuCBtQD1PbLnvjRBcAoMCDjYws
NNuRM9eqsfYiRGl9wYI7
=aFMS
-----END PGP SIGNATURE-----
More information about the users
mailing list