Re: Manpage typo

2024-09-17 Thread Lawrence Velázquez
On Wed, Sep 18, 2024, at 1:22 AM, John Devin wrote: > On line 3987 of bash.1 (here: > https://git.savannah.gnu.org/cgit/bash.git/tree/doc/bash.1#n3987), > `The\fBextglob\fP` is missing a space between 'The' and 'extglob'. This was fixed on the "devel" branch in 2022. https://git.savannah.gnu.org/

Re: Readline Documentation

2024-09-17 Thread John Devin
On Fri, Sep 13, 2024 at 3:24 PM Chet Ramey wrote: > > > I considered that maybe it > > would only do this in response to being set directly, but neither > > ~/.bashrc nor /etc/bash.bashrc on my system include it, nor any other > > file I can find. Unless this has been changed between that version

Manpage typo

2024-09-17 Thread John Devin
On line 3987 of bash.1 (here: https://git.savannah.gnu.org/cgit/bash.git/tree/doc/bash.1#n3987), `The\fBextglob\fP` is missing a space between 'The' and 'extglob'. I'm not sure how small typos have to be before they're not worth an email, so if this is, let me know. - John Devin

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-17 Thread Oğuz
On Wed, Sep 18, 2024 at 4:19 AM Steffen Nurpmeso wrote: > It boils down to this: f(){ echo $#;}; set "" "" ""; IFS=x; f $* bash, NetBSD and FreeBSD sh, and ksh88 all agree and print 2. pdksh prints 3 but mksh and oksh print 1. dash, ksh93, yash, and zsh print 0.

Re: Suggested BASH Improvement

2024-09-17 Thread alex xmb sw ratchev
another is ${var##0} On Wednesday, September 18, 2024, BRUCE FOWLER via Bug reports for the GNU Bourne Again SHell wrote: > An interesting problem I ran into recently: > > I have a shell script that I run about once a month that > "screen-scrapes" from the output of another program using the > s

Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-17 Thread Steffen Nurpmeso
Hello. I am terribly sorry to be here once again; i already mentioned on bug-bash@ the problem with IFS being reverse solidus that dash (and myself) has (have). I came back to this for my one again, and i stumble over one additional difference in behaviour in between (myself and) bash, dash and bu

Suggested BASH Improvement

2024-09-17 Thread BRUCE FOWLER via Bug reports for the GNU Bourne Again SHell
An interesting problem I ran into recently: I have a shell script that I run about once a month that "screen-scrapes" from the output of another program using the substring capability, e.g. ${data_line:12:2}. This is pulling out the two-digit month ranging from "01" to "12". This worked fine, e

Re: 'wait -n' with and without id arguments

2024-09-17 Thread Chet Ramey
On 9/9/24 10:45 AM, Zachary Santer wrote: He wants interactive shells to notify the user less frequently about job status changes so `wait -n' works better. That's one option, but not my preferred option. I'll attempt a tl;dr: Stipulating that this is for interactive shells only. A) Solve

Re: (question) fast split/join of strings

2024-09-17 Thread alex xmb sw ratchev
cool .. gotta do .. thxx n greets .. On Tuesday, September 17, 2024, Greg Wooledge wrote: > On Tue, Sep 17, 2024 at 17:00:16 +0200, alex xmb sw ratchev wrote: > > plz what does 'local -' do , its newer to me > > i forgot all about it already > >local [option] [name[=value] ... | - ] >

Re: (question) fast split/join of strings

2024-09-17 Thread Greg Wooledge
On Tue, Sep 17, 2024 at 17:00:16 +0200, alex xmb sw ratchev wrote: > plz what does 'local -' do , its newer to me > i forgot all about it already local [option] [name[=value] ... | - ] For each argument, a local variable named name is created, and assigned valu

Re: (question) fast split/join of strings

2024-09-17 Thread alex xmb sw ratchev
very respectable great email mate the set -f , ye i always missed it i gotta train me that more in the 1,2,,3 issue , id say thata valid cause ,, is literarly an empty field a second sep seems me great just as awk , one sep is for fields on a line , one is the per line sep set -f ; ss=$'\1\2' ss

Re: (question) fast split/join of strings

2024-09-17 Thread Greg Wooledge
On Tue, Sep 17, 2024 at 16:07:58 +0200, alex xmb sw ratchev wrote: > savedifs=${IFS@A} savedifs=${savedifs:- unset -v IFS } > str=1,2,3 IFS=, arr=( $str ) joined=${arr[*]} > eval "$savedifs" Using unquoted $str in an array expansion to do the splitting has a couple drawbacks: 1) Globbing (filenam

Re: (question) fast split/join of strings

2024-09-17 Thread alex xmb sw ratchev
in the printf to stdout a final printf \\n is missing greets On Tuesday, September 17, 2024, alex xmb sw ratchev wrote: > savedifs=${IFS@A} savedifs=${savedifs:- unset -v IFS } > str=1,2,3 IFS=, arr=( $str ) joined=${arr[*]} > eval "$savedifs" > > alternative middleline > > sep=, str=1$sep2$sep

Re: (question) fast split/join of strings

2024-09-17 Thread alex xmb sw ratchev
savedifs=${IFS@A} savedifs=${savedifs:- unset -v IFS } str=1,2,3 IFS=, arr=( $str ) joined=${arr[*]} eval "$savedifs" alternative middleline sep=, str=1$sep2$sep3 IFS=$sep arr=( $str ) joined=${arr[*]} ( at var=assignment , quotes dont matter , excepts to bind spaced code together as cmd or cmd

Re: (question) fast split/join of strings

2024-09-17 Thread Greg Wooledge
On Tue, Sep 17, 2024 at 02:56:05 -0400, Lawrence Velázquez wrote: > This question is more appropriate for help-bash than bug-bash. > > On Tue, Sep 17, 2024, at 2:21 AM, William Park wrote: > > For splitting, I'm aware of > > old="a,b,c" > > IFS=, read -a arr <<< "$old"