[Top][All Lists]

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

GNU Parallel --plus Capabilities

From: Larry Ploetz
Subject: GNU Parallel --plus Capabilities
Date: Thu, 26 May 2022 18:16:29 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

Feature request:

Given the (second) command below, line 3 would be more like bash if it substituted all periods with underscores (instead of none due to no match):

$ parallel --version
GNU parallel 20220522
Copyright (C) 2007-2022 Ole Tange, and Free Software
Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
GNU parallel comes with no warranty.

Web site:

When using programs that use GNU Parallel to process data for publication
please cite as described in 'parallel --citation'.
$ echo a.b.c | parallel --plus 'var={}; echo -e bash var:\\t\\t$var; echo -e parallel single:\\t{/\./_}; echo -e parallel all:\\t\\t{//\./_}; echo -e bash single:\\t\\t${var/./_}; echo -e bash all:\\t\\t${var//./_}' | cat -n
     1  bash var:               a.b.c
     2  parallel single:        a_b.c
     3  parallel all:           a.b.c
     4  bash single:            a_b.c
     5  bash all:               a_b_c

There are probably other nuances of bash parameter expansion that could be included in GNU Parallel.

ยท Larry

reply via email to

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