Re: Stupid bash question

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

 



aragonx@xxxxxxxxxx wrote:
> 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.
> 
One thing that would probably help your understanding is that [ is
actually a command. It is usually a shell built-in command, but it
is also a command in /usr/bin, and is the same as the test command.

You may want to read the bash man page. It covers the [ command, as
well as how && and || are processed by  the shell.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux