[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Return / exit values
From: |
Greg Wooledge |
Subject: |
Re: Return / exit values |
Date: |
Thu, 10 Sep 2020 08:00:48 -0400 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Sep 10, 2020 at 03:42:50PM +1000, David wrote:
> On Thu, 10 Sep 2020 at 10:10, Chris Elvidge <celvidge001@gmail.com> wrote:
>
> > However 'N=0; echo $((!$N))' gives an error at the bash prompt.
>
> Put a space after the exclamation point, otherwise it triggers history
> expansion
> in the interactive shell. Demo:
>
> $ N=0; echo $((! N))
> 1
Or... turn off history expansion. I found it to be more trouble than
it's worth, but some people love it, so it's a personal choice.