Stupid bash question

Paul Lemmons paul.lemmons at tmcaz.com
Mon Dec 10 22:48:09 UTC 2007


The "&&" says "if the previous command was successful, do the following 
command. So, if you have a command "isthislinux" on your machine (I do 
not) and it returns the string "LINUX" it will issue the ulimit command. 
If you do not have that command or the command returns something else, 
it will not.

So, the short answer is: yes


-------- Original Message  --------
Subject: Stupid bash question
From: aragonx at dcsnow.com
To: fedora-list at redhat.com
Date: 12/10/2007 03:29 PM

> Okay, I'm confused.  How would bash interpret this line?
> 
> [ "`isthislinux`" = "LINUX" ] && ulimit -S -n 65536
> 
> Would that be teh same as:
> 
> if [ "`isthislinux`" == "LINUX" ]
> then
>    ulimit -S -n 65536
> fi
> 
> This is quite confusing to me.
> 
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3257 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20071210/fe1e0139/attachment-0001.bin>


More information about the fedora-list mailing list