RE: test for directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If [ -d /path/a -a -d /path/b]
then
        <code>
Else
        <code>
fi


AT

-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Krishnaprasad_K@xxxxxxxx
Sent: Tuesday, August 18, 2009 4:50 PM
To: redhat-list@xxxxxxxxxx
Subject: RE: test for directory

If [ -d /path/a ] && [ -d /path/b]
then
        <code>
Else
        <code>
fi

Thanks,
Krishnaprasad


-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx
[mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Slackli User
Sent: Tuesday, August 18, 2009 6:17 PM
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@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

-----------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.  If you are not the intended recipient any use, distribution, copying or disclosure is strictly prohibited. If you have
received this message in error, please notify the sender immediately either by telephone or by e-mail and delete  this message and any attachment from your system. Correspondence via e-mail is for information purposes only.
 ZAO Raiffeisenbank neither makes nor accepts legally binding statements by e-mail unless otherwise agreed.
-----------------------------------

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux