Linux, Unix, /etc

Danger Will Robinson! You are now entering a condescending Unix user zone!
Sponsored links (requires javascript):

Scripts: Special Stuff for Unix Haters

The Unix Haters Handbook has several curious episodes in which a hapless Unix hater attempts unsuccessfully to solve simple tasks with Unix. Two of these in particular struck me as being very simple, so I wrote some scripts.

findfunc: find references to a C function

 
#!/bin/sh
#findfunc: find references to a C function

pattern='[A-Za-z_]*[^A-Za-z_]*'$1'[^A-Za-z_]*('
grep "$pattern" $*


match: find file <name> that has no matching <name>c file

 
#!/bin/sh
# match: find file <name> without matching <name>c file

for i in $*
do
    if [ ! -f "$i"c ];
    then
	echo "$i";
    fi
done


[back to Scripts index] [back to Linux, Unix, etc] [Main Site] [Weblog]



Contents licensed under the GPL