Re: `help cut` doesn't document what -a does

2025-06-05 Thread Martin D Kealey
On Thu, 5 Jun 2025 at 20:22, Duncan Roe wrote: > On Wed, Jun 04, 2025 at 09:43:00AM -0400, Chet Ramey wrote: > > Is it useful to combine multiple selected fields (-f) into one space- > > separated field so `cut' can put the selected portions of each line into > > a corresponding array element? >

Re: `help cut` doesn't document what -a does

2025-06-05 Thread Duncan Roe
On Thu, Jun 05, 2025 at 11:12:43PM -0400, Greg Wooledge wrote: > On Fri, Jun 06, 2025 at 12:55:34 +1000, Duncan Roe wrote: > > On Thu, Jun 05, 2025 at 06:55:55AM -0400, Greg Wooledge wrote: > > > On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > > > > i installed bash dev , but there is no

Re: `help cut` doesn't document what -a does

2025-06-05 Thread Greg Wooledge
On Fri, Jun 06, 2025 at 12:55:34 +1000, Duncan Roe wrote: > On Thu, Jun 05, 2025 at 06:55:55AM -0400, Greg Wooledge wrote: > > On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > > > i installed bash dev , but there is no `help cut` > > > > It's a "loadable builtin". You have to build those

Re: `help cut` doesn`t document what -a does

2025-06-05 Thread Lawrence Velázquez
On Thu, Jun 5, 2025, at 8:37 AM, Stan Marsh wrote: > Actually, I am not too fond of the habit of having builtins (particularly > those supplied as part of the distribution) with the same name as well-known > Unix commands. It allows for potential drop-in replacement if the external commands are un

Re: `help cut` doesn't document what -a does

2025-06-05 Thread Duncan Roe
On Thu, Jun 05, 2025 at 06:55:55AM -0400, Greg Wooledge wrote: > On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > > i installed bash dev , but there is no `help cut` > > It's a "loadable builtin". You have to build those, install them, > and then load the "cut" builtin explicitly. > `mak

Re: lcut query

2025-06-05 Thread Duncan Roe
On Thu, Jun 05, 2025 at 01:39:24PM -0400, Chet Ramey wrote: > On 6/5/25 10:27 AM, Chet Ramey wrote: > > On 6/5/25 6:41 AM, Duncan Roe wrote: > > > Hi Chet, > > > > > > `help lcut` implies to me that columns specified -b or -c should go to > > > separate elements of ARRAY (unlike what cut does), but

Re: lcut query

2025-06-05 Thread Chet Ramey
On 6/5/25 10:27 AM, Chet Ramey wrote: On 6/5/25 6:41 AM, Duncan Roe wrote: Hi Chet, `help lcut` implies to me that columns specified -b or -c should go to separate elements of ARRAY (unlike what cut does), but they do not. Thanks, I'll take a look. I haven't played with `lcut' in a long time;

Re: lcut query

2025-06-05 Thread Chet Ramey
On 6/5/25 6:41 AM, Duncan Roe wrote: Hi Chet, `help lcut` implies to me that columns specified -b or -c should go to separate elements of ARRAY (unlike what cut does), but they do not. Thanks, I'll take a look. I haven't played with `lcut' in a long time; that's why it's not in the makefile.

Re: `help cut` doesn`t document what -a does

2025-06-05 Thread Stan Marsh
On Thu, Jun 5, 2025, 12:56 PM Greg Wooledge wrote: > On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > > i installed bash dev , but there is no `help cut` > > It's a "loadable builtin". You have to build those, install them, > and then load the "cut" builtin explicitly. It was far fro

Re: `help cut` doesn't document what -a does

2025-06-05 Thread microsuxx
thxx , ++ On Thu, Jun 5, 2025, 12:56 PM Greg Wooledge wrote: > On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > > i installed bash dev , but there is no `help cut` > > It's a "loadable builtin". You have to build those, install them, > and then load the "cut" builtin explicitly. > >

Re: `help cut` doesn't document what -a does

2025-06-05 Thread Greg Wooledge
On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > i installed bash dev , but there is no `help cut` It's a "loadable builtin". You have to build those, install them, and then load the "cut" builtin explicitly.

lcut query

2025-06-05 Thread Duncan Roe
Hi Chet, `help lcut` implies to me that columns specified -b or -c should go to separate elements of ARRAY (unlike what cut does), but they do not. | 20:20:34$ lcut -a i -c1,2,3 abc | 20:30:13$ echo ${i[0]} | abc | 20:30:23$ echo ${i[1]} | | 20:30:42$ Cheers ... Duncan.

Re: `help cut` doesn't document what -a does

2025-06-05 Thread microsuxx
i installed bash dev , but there is no `help cut` On Wed, Jun 4, 2025, 3:43 PM Chet Ramey wrote: > On 6/2/25 5:58 AM, Duncan Roe wrote: > > Hi, > > > > `cut -a ARRAY ...` puts its last line of output in ARRAY[0] and discards > any > > other elements ARRAY used to have. I tried 3 alternatives: >

Re: `help cut` doesn't document what -a does

2025-06-05 Thread Duncan Roe
On Wed, Jun 04, 2025 at 09:43:00AM -0400, Chet Ramey wrote: > On 6/2/25 5:58 AM, Duncan Roe wrote: > > Hi, > > > > `cut -a ARRAY ...` puts its last line of output in ARRAY[0] and discards any > > other elements ARRAY used to have. I tried 3 alternatives: > > Thanks for the report. Yes, sometimes ma