Bourne shell question

Jay A. Konigsberg jak at sactoh0.UUCP
Wed Oct 11 04:41:17 AEST 1989


I have a small shell script that I can't get quite right. What it
is supposed to do is list subdirectories or the message "There are
no subdirectories". The script is as follows:

ls -l | grep "^d" | pg || echo "There are no subdirectories"

When the pipe into " pg " is removed it works ok, but I would like
to keep the pg in the script.

Thanks to all who respond.
-- 
#############################################################
#  Jay Konigsberg	     # (916) 484-6029		    #
#  SAC-UNIX, Sacramento, Ca. # UUCP=...pacbell!sactoh0!jak  #
#############################################################



More information about the Comp.unix.questions mailing list