Testing for non-empty wildcards

Chip Salzenberg chip at ateng.ateng.com
Tue Dec 27 00:47:25 AEST 1988


According to shankar at hpclscu.HP.COM (Shankar Unni):
>
>    find sccs -name 'p.*' -print | while read file
>	do
>	    # list of commands on $file
>	done

Or:

    them="`find SCCS -name "p.*" -print | sed 's#^SCCS/p\.##`"
    if [ ! "$them" ]
    then
	echo "Nothing is checked out!"
    else
	for f in $them
	do
	    get -s -p SCCS/s.$f | diff - $f
	done
    fi

This has the nice feature of collecting all the names into a variable for
examination and possible re-use.
-- 
Chip Salzenberg             <chip at ateng.com> or <uunet!ateng!chip>
A T Engineering             Me?  Speak for my company?  Surely you jest!
	  "It's no good.  They're tapping the lines."



More information about the Comp.unix.wizards mailing list