An XARGS question

alan alan at clueserver.org
Tue Jul 18 19:35:02 UTC 2006


On Tue, 18 Jul 2006, Michael Yep wrote:

> Hello
>
> Is there a way to have xargs or perhaps another tool take a list from
> stdin and put it somewhere besides the last argument?
>
> Say if i want to get all the offending IPs (bad logins) for a given day
> then i want to take that list and see if its in a file called blacklist
>

lastb -ai |fgrep "Jul 18" |awk '{print $10 }'|sort|uniq | xargs grep -i {} 
blacklist

-- 
"I want to live just long enough to see them cut off Darl's head and
  stick it on a pike as a reminder to the next ten generations that some
  things come at too high a price. I would look up into his beady eyes and
  wave, like this... (*wave*!). Can your associates arrange that for me,
  Mr. McBride?"
                       - Vir "Flounder" Kotto, Sr. VP, IBM Empire.




More information about the fedora-list mailing list