On Fri, 24 Jan 2025, Glen Huang wrote: > And display the output as > > $ parallel cmd ::: A B C > A: <last line from cmd A>
If cmd is "seq" and you put it in a script cmd.sh then it is. Script cmd.sh: #! /bin/bash seq $1 | tail -n 1 | sed "s/^/$1: /" parallel ./cmd.sh ::: 3 4 5 seq $1: prints numbers from 1 to $1 tail -n 1: display last line sed "s/^/$1: /": prefix line with "$1: " -- ./hans