test for directory

Dave Ihnat dihnat at dminet.com
Tue Aug 18 13:30:59 UTC 2009


On Tue, Aug 18, 2009 at 07:50:45AM -0500, Marti, Rob wrote:
> [root at ab1-4-160 ~]# if [ -d /etc ] && [ -d /home ]; then echo "Yes."; fi
> Yes.

Or, maybe less expensive:

  if [ \( -d /etc \) -a \( -d /home \) ]; then echo "Yes."; fi

Cheers,
--
	Dave Ihnat
	dihnat at dminet.com




More information about the redhat-list mailing list