Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!pacbell!sactoh0!jak From: jak@sactoh0.UUCP (Jay A. Konigsberg) Newsgroups: comp.unix.questions Subject: Bourne shell question Keywords: pipe, logical 'or' and " pg ". Message-ID: <1943@sactoh0.UUCP> Date: 10 Oct 89 18:41:17 GMT Distribution: usa Organization: Sacramento Public Access, Ca. USA Lines: 16 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 # #############################################################