Re: posix command search and execution

2023-11-10 Thread Chet Ramey
On 11/9/23 11:17 AM, Mike Jonkmans wrote: On Thu, Nov 09, 2023 at 10:12:06PM +0700, Robert Elz wrote: Date:Thu, 9 Nov 2023 14:21:35 +0100 From:Mike Jonkmans Message-ID: <20231109132135.ga208...@jonkmans.nl> | If I am not mistaken, for POSIX compliance, both

Re: posix command search and execution

2023-11-10 Thread Chet Ramey
On 11/9/23 8:21 AM, Mike Jonkmans wrote: I see. Weirdly on Ubuntu 22.04, with /bin symlinked to /usr/bin, `getconf PATH' produces `/bin:/usr/bin'. That looks like a recipe for redundant `stats'. Does that matter? The value getconf returns is static, and is guaranteed to find all the standard

Re: posix command search and execution

2023-11-10 Thread Chet Ramey
On 11/8/23 6:40 PM, Mike Jonkmans wrote: On Wed, Nov 08, 2023 at 11:52:19PM +0700, Robert Elz wrote: Date:Tue, 7 Nov 2023 23:04:10 +0100 From:Mike Jonkmans Message-ID: <20231107220410.gc27...@jonkmans.nl> | It makes sense to partition the builtins in three

Re: posix command search and execution

2023-11-10 Thread Chet Ramey
On 11/8/23 5:10 PM, Mike Jonkmans wrote: Can this intrinsic list be amended with any user loaded builtins? You mean enable -f? It's up to the shell implementation. Bash treats dynamically-loaded builtins the same as any other builtin. That was indeed what I meant. Does the new POSIX version

Re: the portability of seq(1) (was: Idea: jobs(1) -i to print only :%ID:s)

2023-11-10 Thread Greg Wooledge
On Fri, Nov 10, 2023 at 01:09:29PM -0600, G. Branden Robinson wrote: > At 2023-11-10T10:54:52-0800, Eric Pruitt wrote: > > From _seq(1)_ on FreeBSD: > > > > > The seq command first appeared in Version 8 AT UNIX. A seq command > > > appeared in NetBSD 3.0, and was ported to FreeBSD 9.0. This

the portability of seq(1) (was: Idea: jobs(1) -i to print only :%ID:s)

2023-11-10 Thread G. Branden Robinson
At 2023-11-10T10:54:52-0800, Eric Pruitt wrote: > On Fri, Nov 10, 2023 at 01:22:54PM -0500, Greg Wooledge wrote: > > It most definitely is *not* everywhere. It's part of GNU coreutils, > > and is generally not present on any system that does't use those > > (BSDs and commercial Unixes for

Re: Idea: jobs(1) -i to print only :%ID:s

2023-11-10 Thread Greg Wooledge
On Fri, Nov 10, 2023 at 10:54:52AM -0800, Eric Pruitt wrote: > > A seq command appeared in Version 8 AT UNIX. This version of seq > > appeared in NetBSD 3.0 and was ported to OpenBSD 7.1. Ah, I'm a year and a half behind. OpenBSD 7.1 was released April 2022.

Re: Idea: jobs(1) -i to print only :%ID:s

2023-11-10 Thread Eric Pruitt
On Fri, Nov 10, 2023 at 01:22:54PM -0500, Greg Wooledge wrote: > It most definitely is *not* everywhere. It's part of GNU coreutils, > and is generally not present on any system that does't use those (BSDs > and commercial Unixes for example). >From _seq(1)_ on FreeBSD: > The seq command first

Re: Idea: jobs(1) -i to print only :%ID:s

2023-11-10 Thread Steffen Nurpmeso
Greg Wooledge wrote in : |On Fri, Nov 10, 2023 at 06:59:10PM +0100, Steffen Nurpmeso wrote: |> Sequences are also bash-only (though seq(1) is |> everywhere). | |It most definitely is *not* everywhere. It's part of GNU coreutils, |and is generally not present on any system that does't use

Re: Idea: jobs(1) -i to print only :%ID:s

2023-11-10 Thread Greg Wooledge
On Fri, Nov 10, 2023 at 06:59:10PM +0100, Steffen Nurpmeso wrote: > Sequences are also bash-only (though seq(1) is > everywhere). It most definitely is *not* everywhere. It's part of GNU coreutils, and is generally not present on any system that does't use those (BSDs and commercial Unixes for

Re: Idea: jobs(1) -i to print only :%ID:s

2023-11-10 Thread Steffen Nurpmeso
Chet Ramey wrote in <7402031f-424c-4766-ba70-71771c9dc...@case.edu>: |On 11/8/23 8:12 PM, Steffen Nurpmeso wrote: |> The "problem" with the current way bash is doing it is that bash's |> job handling does not recognize jobs die under the hood: |> |>$ jobs |>[1]- Stopped

Re: Idea: jobs(1) -i to print only :%ID:s

2023-11-10 Thread Steffen Nurpmeso
Hello. Oğuz wrote in : |On Thursday, November 9, 2023, Steffen Nurpmeso wrote: |> I mean some scripting on "jobs | wc -l" would do that, though. :( |> Maybe i should just write a function that builds the string |> necessary to do what i wanted with %* or "%1-2 %4" etc. |> Eh. Forget about

Re: Defaults when cross-compiling

2023-11-10 Thread Chet Ramey
On 11/8/23 9:59 PM, Michael T. Kloos wrote: It seems to me that Autoconf (configure) is making some bad choices if it is just guessing that support exists like that, especially when it has a guaranteed fallback.  It's job is to setup the build for the target host system. I think you don't

Re: Idea: jobs(1) -i to print only :%ID:s

2023-11-10 Thread Chet Ramey
On 11/8/23 8:12 PM, Steffen Nurpmeso wrote: The "problem" with the current way bash is doing it is that bash's job handling does not recognize jobs die under the hood: $ jobs [1]- Stopped LESS= less -RIFe README [2]+ Stopped LESS= less -RIFe TODO $