Re: test for directory

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

 



On Tue, Aug 18, 2009 at 06:41:30AM -0700, Yong Huang wrote:
> > Or, maybe less expensive:
> > 
> >   if [ \( -d /etc \) -a \( -d /home \) ]; then echo "Yes."; fi

> Can you explain why it's less expensive?

When you use a bracket, you're spawning a subshell.

Cheers,
--
	Dave Ihnat
	dihnat@xxxxxxxxxx

-- 
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