test for directory
Marti, Rob
RJM002 at shsu.edu
Tue Aug 18 12:50:45 UTC 2009
[root at ab1-4-160 ~]# if [ -d /etc ] && [ -d /home ]; then echo "Yes."; fi
Yes.
Rob Marti
-----Original Message-----
From: redhat-list-bounces at redhat.com [mailto:redhat-list-bounces at redhat.com] On Behalf Of Slackli User
Sent: Tuesday, August 18, 2009 7:47 AM
To: General Red Hat Linux discussion list
Subject: test for directory
Hi,
I run this in a bash shell but got wrong.
if [ -d /path/a && -d /path/b ]; then do something; fi
what's the correct syntax for this?
(I remember I once could do this but this time it failed, :-) )
Thanks.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
More information about the redhat-list
mailing list