[Top][All Lists]

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

Re: does formatting matter

From: Greg Wooledge
Subject: Re: does formatting matter
Date: Tue, 14 Jan 2020 09:07:36 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

> > They're equivalent; why does it matter?
> so, it doesn't change the way the code is interpreted.
> this is simple formatting, without impact on a way code is read or
> given to kernel. right ?

Yes.  As you've been told already.

The code is interpreted by bash, not fed to the kernel.

> a simple matter of taste that remains from... first shell ever ?

The VERY first Bourne shell may not have understood the compact
form, with ;then on the first line.  It's hard to be sure nowadays,
because you're asking about stuff that happened 42 years ago.

The only Bourne shell I've got access to, personally, is the one that's
shipped with HP-UX in /usr/old/bin/.  And this one DOES understand
the compact form.

# /usr/old/bin/sh
# echo ^ cat

# if true; then
> echo hi
> fi

Perhaps someone with more historical knowledge can give you a more
definitive answer about how the original Bourne shell parser worked.

For all SUPPORTED current shells, the two forms are equivalent.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]