Steffen Nurpmeso wrote in
 <20231109181645.bocyg%stef...@sdaoden.eu>:
 |Steffen Nurpmeso wrote in
 | <20231109181107.bj0wl%stef...@sdaoden.eu>:
 ||Steffen Nurpmeso wrote in
 || <20231109011212.tc9hj%stef...@sdaoden.eu>:
 || ...
 ||Something like this that would be, adding JLIST_SPEC_ONLY and
 ||jobs(1) -j.  Just in case of interest.
 |
 |I mean some scripting on "jobs | wc -l" would do that, though. :(

Nah, that would be wrong.

 |Maybe i should just write a function that builds the string
 |necessary to do what i wanted with %* or "%1-2 %4" etc.

So i did that (what a mess -- does anyone know how i can create an
awk regular expression where parts of the expression is a variable
that should be expanded?  ugh!  what do i know??):

  j() {
    local j= a=${AWK:-awk}
    [ $# -gt 0 ] && j='&& $2 !~ /(^| )('$(echo "$@" | tr ' ' '|')')( |$)/'
    j=$(jobs -l | $a -F '[][]' '/^[[]/'"$j"'{print "%" $2}{next}')
    echo $j
  }

 |Eh.  Forget about it.

Sorry for the noise.

--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