I think these features are worth adding:
{{ }} - Similar to { }, but runs like a function so variables can be
declared local
return n [x] - Assigns n to $? and x to $: if specified
${{ }} - Executes like {{ }} but also expands to the value of $:
$: will be reset to an empty string at the beginn
On 2021/04/26 17:16, Chet Ramey wrote:
On 4/26/21 7:19 PM, L A Walsh wrote:
I'm not clear if termcap lib has this or not, when the curses
library is in use, it supports the idea of reading and setting
the term [tab]size.
Can't you do this with `stty size' already?
Setting size: sometimes,
On 4/29/21 12:59 PM, Tom (AST) Watson wrote:
All...
I've resigned to having it the way it is, but I note that the solution doesn't
need the backslash escape:
[tsw@box6 ~]$ k=10
[tsw@box6 ~]$ eval echo {1..$k}
1 2 3 4 5 6 7 8 9 10
This one doesn't, but putting in the slash skips the first brac
All...
I've resigned to having it the way it is, but I note that the solution doesn't
need the backslash escape:
[tsw@box6 ~]$ k=10
[tsw@box6 ~]$ eval echo {1..$k}
1 2 3 4 5 6 7 8 9 10
I'm finding out lots of things as I go along. Need to understand the
"features" as they show themselves.
Tha
On 4/29/21 8:12 AM, Ilkka Virta wrote:
Maybe, but it's never worked that way and was never intended to. You can
get what you need using eval:
eval echo \{1..${i}}
BTW, was there some background to why they're ordered like this? I'm not
sure if I have heard the story, and didn't s
On Thu, Apr 29, 2021 at 03:12:09PM +0300, Ilkka Virta wrote:
> BTW, was there some background to why they're ordered like this? I'm not
> sure if I have heard the story, and didn't see anything about it in Greg's
> wiki or bash-hackers.org (of course they tell the "what", but not the
> "why"). I di
On Thu, Apr 29, 2021 at 4:18 AM Chet Ramey wrote:
> Maybe, but it's never worked that way and was never intended to. You can
> get what you need using eval:
>
> eval echo \{1..${i}}
>
BTW, was there some background to why they're ordered like this? I'm not
sure if I have heard the story, and did
On Wed, Apr 28, 2021 at 11:02:31PM +, Tom (AST) Watson via Bug reports for
the GNU Bourne Again SHell wrote:
> Hi...
>
> [user@box3 ~]$ echo $l
> 10
> [user@box3 ~]$ echo {1..${l}}
> {1..10}
https://mywiki.wooledge.org/BashPitfalls#pf33