[SLUG] fun with the command line

From: Eben King (eben01@verizon.net)
Date: Thu Apr 30 2009 - 11:18:10 EDT


I have a script (calls) which prints all recent (<=1 week with no args, else
its args are filenames) which takes the "-r" flag to make a "raw" output. I
also have a script (searchcid) which takes a number or name and looks it up
in my phone book.

The reason I wrote that is to explain this command line:

calls -r /var/log/syslog* | grep ORGA | tr '[' ' ' | tr ']' ' ' | tr -s ' '
| cut -f 6 -d ' ' | sort -u | xargs -n 1 searchcid | grep -v orga

It takes all recent (last 5 weeks) calls from ORGANIZATIONAL (whoever they
are), looks them up in my phone book, and prints the entries which aren't
listed as "organizational".

-- 
-eben      QebWenE01R@vTerYizUonI.nOetP      royalty.mine.nu:81
      If you need someone to blame
      Throw a rock in the air
      You'll hit someone guilty -- U2, _Zooropa_, "Dirty Day"
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:48:10 EDT