bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Steffen Nurpmeso
Subject: Re: Idea: jobs(1) -i to print only :%ID:s
Date: Fri, 10 Nov 2023 18:59:10 +0100
User-agent: s-nail v14.9.24-563-g944131280a

Hello.

Oğuz wrote in
 <CAH7i3Lo1nTbGKax7=UC+6wTMOSiCpjr-7nzw+5OUAxnRrbf26A@mail.gmail.com>:
 |On Thursday, November 9, 2023, Steffen Nurpmeso <steffen@sdaoden.eu> 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 it.
 |
 |Can't you abuse jobs -x somehow? Like this perhaps
 |
 |    jobs -x printf '%s\n' %{1..100} | awk '!/%/{print "%"NR}'

Well i first thought "this is darn smart", but then realized this
is at the level of that wc -l thing which is definetely the wrong
thing to do.  Sequences are also bash-only (though seq(1) is
everywhere).  But thanks.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]