bash scripting

Jerry Feldman gaf at blu.org
Fri Sep 29 16:02:32 EDT 2000


Do a man test.
On Unix systems, the '[' is aliased to the test command such that the 
expression: [ ! -f foo -a -f bar ]; is equivalent to test ! -f foo -a -f bar


On 29 Sep 2000, at 15:35, Derek Martin wrote:

> On Fri, 29 Sep 2000, Tom Guilderson wrote:
> 
> > I came accros the following construct in a bash script:
> > 
> > if [ ! -f /path_to_file_1 -a -f /path_to_file_2 ] ; then
> > 	execute some stuff
> > fi
> > 
> > My question is what is the -a option?
> 
> It means "AND" like the C operator '&&'.
> 
> 
> -- 
> Derek Martin
> Senior System Administrator
> Mission Critical Linux
> martin at MissionCriticalLinux.com 
> 
> -
> Subcription/unsubscription/info requests: send e-mail with
> "subscribe", "unsubscribe", or "info" on the first line of the
> message body to discuss-request at blu.org (Subject line is ignored).


Jerry Feldman <gaf at blu.org>
Associate Director
Boston Linux and Unix user group
http://www.blu.org
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list