On Fri, 19 Mar 2021 07:09:06 +0100
Pierre Labastie <pierre.labas...@neuf.fr> wrote:

> 
> Using brackets depends on "something". If something is a predicate,
> you need brackets. If something is a (compound) command, no
> brackets. I've not looked in details at the "if" in the boot
> scripts, but they must be correct in this respect, since they seem
> to work...
> 

By brackets are you talking about [ ] or [[ ]]?

if [ something ]; then this; fi,

Really means

if test something; then this; fi

[ is actually test, and the [ must be followed by ]

[[ ]]  is an expression

See the gnu bash reference manual for clarification.

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to