Your favourite UNIX pipe ?

Joe Bush bush at evax.arl.utexas.edu
Sat May 26 05:18:31 AEST 1990


	Here is one I concocted to search for key words in include
files:

echo -n "key=";set kw=`line`;find /usr/include/. /sys/. -name \*.h -print | xargs hgrep "$kw" {} 

	I keep a file of such one-liners like the one above (file of
one line pipe-programs is named $HOME/.syscom) and have the following
line in my .cshrc:

alias g 'set j=`cat ${home}/.syscom|wc -l`;source -h ${home}/.syscom; history | tail -"$j"'

	Then when I enter "g" from the keyboard, my csh history
mechanism gets primed for easy execution. I find it quite handy...

	- Joe
-- 
	  bush at evax.arl.utexas.edu		  Vax Systems Manager
	  (817) 273 - 3333			  CSE Dept. UT-Arlington
	  Office Rm 221 EB2			  403 South Cooper
	  P.O. Box 19015			  Arlington, Texas 76019



More information about the Comp.unix.wizards mailing list