On Tue, Apr 10, 2012 at 16:38, Elliott Forney elliott.for...@gmail.comwrote:
On Tue, Apr 10, 2012 at 1:22 AM, Maarten Billemont lhun...@lyndir.com
wrote:
People should stop trying to execute code by parameter expansion, and
specifically stop thinking that parameter-expanded words are
On 10 Apr 2012, at 06:03, Elliott Forney wrote:
Here is another example that appears to defy my expectations. In this
case, the semicolon is allowed:
sine:~$ hello='echo hello'
sine:~$ world='echo world'
sine:~$ ${hello};${world}
hello
world
sine:~$ unset hello
sine:~$
On Tue, Apr 10, 2012 at 1:22 AM, Maarten Billemont lhun...@lyndir.com wrote:
People should stop trying to execute code by parameter expansion, and
specifically stop thinking that parameter-expanded words are evaluated as
bash code.
I still think the behavior is interesting. The statement
Sure, a comment can be used to place a line in your history but that
doesn't really address the examples I had. Just seems to me like a
lone semicolon could be treated as a newline/noop. I can't seem to
think of anything that this would break but, of course, that doesn't
mean it wouldn't. The
Here is another example that appears to defy my expectations. In this
case, the semicolon is allowed:
sine:~$ hello='echo hello'
sine:~$ world='echo world'
sine:~$ ${hello};${world}
hello
world
sine:~$ unset hello
sine:~$ ${hello};${world}
world
sine:~$ unset world
sine:~$ ${hello};${world}
On 4/7/2012 4:00 PM, Elliott Forney wrote:
I wish bash would happily execute lines that begin with a semicolon,
i.e., treat it as a no-op followed by a command. The following
examples come to mind:
$ infloop echo hello
[2] 11361
hello
$ infloop; echo hello
bash: syntax error near unexpected
Could also use a #, no?
On Sun, Apr 8, 2012 at 8:46 PM, Steven W. Orr ste...@syslang.net wrote:
On 4/7/2012 4:00 PM, Elliott Forney wrote:
I wish bash would happily execute lines that begin with a semicolon,
i.e., treat it as a no-op followed by a command. The following
examples come to
I wish bash would happily execute lines that begin with a semicolon,
i.e., treat it as a no-op followed by a command. The following
examples come to mind:
$ infloop echo hello
[2] 11361
hello
$ infloop; echo hello
bash: syntax error near unexpected token `;'
$ echo hello; echo world
hello
world
Elliott Forney wrote:
I wish bash would happily execute lines that begin with a semicolon,
i.e., treat it as a no-op followed by a command. The following
examples come to mind:
$ infloop echo hello
hello
$ infloop; echo hello
bash: syntax error near unexpected token `;'
$ echo hello;