mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 05:57:54 +00:00
parallel: --plus bug if input ended in .
This commit is contained in:
parent
b74f2d5629
commit
6097ff9de7
16
src/parallel
16
src/parallel
|
@ -2703,8 +2703,8 @@ sub init_globals() {
|
||||||
'{//}' =>
|
'{//}' =>
|
||||||
('$Global::use{"File::Basename"} ||= eval "use File::Basename; 1;"; '.
|
('$Global::use{"File::Basename"} ||= eval "use File::Basename; 1;"; '.
|
||||||
'$_ = dirname($_);'),
|
'$_ = dirname($_);'),
|
||||||
'{/.}' => 's:.*/::; s:\.[^/.]+$::;',
|
'{/.}' => 's:.*/::; s:\.[^/.]*$::;',
|
||||||
'{.}' => 's:\.[^/.]+$::',
|
'{.}' => 's:\.[^/.]*$::',
|
||||||
);
|
);
|
||||||
%Global::plus =
|
%Global::plus =
|
||||||
(
|
(
|
||||||
|
@ -2716,12 +2716,12 @@ sub init_globals() {
|
||||||
# a.b => b; a => ''
|
# a.b => b; a => ''
|
||||||
'{+.}' => 's:.*\.:: || s:.*$::',
|
'{+.}' => 's:.*\.:: || s:.*$::',
|
||||||
# a.b.c => b.c; a.b => ''; a => ''
|
# a.b.c => b.c; a.b => ''; a => ''
|
||||||
'{+..}' => 's:.*\.([^/.]+\.[^/.]+)$:$1: || s:.*$::',
|
'{+..}' => 's:.*\.([^/.]*\.[^/.]*)$:$1: || s:.*$::',
|
||||||
'{+...}' => 's:.*\.([^/.]+\.[^/.]+\.[^/.]+)$:$1: || s:.*$::',
|
'{+...}' => 's:.*\.([^/.]*\.[^/.]*\.[^/.]*)$:$1: || s:.*$::',
|
||||||
'{..}' => 's:\.[^/.]+\.[^/.]+$::',
|
'{..}' => 's:\.[^/.]*\.[^/.]*$::',
|
||||||
'{...}' => 's:\.[^/.]+\.[^/.]+\.[^/.]+$::',
|
'{...}' => 's:\.[^/.]*\.[^/.]*\.[^/.]*$::',
|
||||||
'{/..}' => 's:.*/::; s:\.[^/.]+\.[^/.]+$::',
|
'{/..}' => 's:.*/::; s:\.[^/.]*\.[^/.]*$::',
|
||||||
'{/...}' => 's:.*/::; s:\.[^/.]+\.[^/.]+\.[^/.]+$::',
|
'{/...}' => 's:.*/::; s:\.[^/.]*\.[^/.]*\.[^/.]*$::',
|
||||||
# n choose k = Binomial coefficient
|
# n choose k = Binomial coefficient
|
||||||
'{choose_k}' => ('for $t (2..$#arg)'.
|
'{choose_k}' => ('for $t (2..$#arg)'.
|
||||||
'{ if($arg[$t-1] ge $arg[$t]) { skip() } }'),
|
'{ if($arg[$t-1] ge $arg[$t]) { skip() } }'),
|
||||||
|
|
|
@ -14,7 +14,10 @@ par_plus() {
|
||||||
parallel -k --plus echo {} = {+/}/{/} = {.}.{+.} = {+/}/{/.}.{+.} = \
|
parallel -k --plus echo {} = {+/}/{/} = {.}.{+.} = {+/}/{/.}.{+.} = \
|
||||||
{..}.{+..} = {+/}/{/..}.{+..} = {...}.{+...} = \
|
{..}.{+..} = {+/}/{/..}.{+..} = {...}.{+...} = \
|
||||||
{+/}/{/...}.{+...} \
|
{+/}/{/...}.{+...} \
|
||||||
::: a a.b a.b.c a.b.c.d a/1 a.b/1.2 a.b.c/1.2.3 a.b.c.d/1.2.3.4
|
::: a a.b a.b.c a.b.c.d a/1 a.b/1.2 a.b.c/1.2.3 a.b.c.d/1.2.3.4 \
|
||||||
|
a. a.b. a.b.c. a.b.c.d. a/1. a.b/1.2. a.b.c/1.2.3. a.b.c.d/1.2.3.4. \
|
||||||
|
a.. a.b.. a.b.c.. a.b.c.d.. a./1. a.b./1.2.. \
|
||||||
|
a.b.c./1.2.3.. a.b.c.d./1.2.3.4.. \
|
||||||
|
|
||||||
echo '### Test {%...} {%%...} {#...} {##...}'
|
echo '### Test {%...} {%%...} {#...} {##...}'
|
||||||
a=z.z.z.foo
|
a=z.z.z.foo
|
||||||
|
|
|
@ -43,7 +43,7 @@ par_influx() {
|
||||||
echo INSERT cpu,host=serverA,region=us_west value=0.65;
|
echo INSERT cpu,host=serverA,region=us_west value=0.65;
|
||||||
echo 'select * from cpu' ) |
|
echo 'select * from cpu' ) |
|
||||||
sql influx:///parallel
|
sql influx:///parallel
|
||||||
sql --show-tables influx:///parallel
|
sql --show-tables influx:///parallel | grep parallel;
|
||||||
sql influx:///parallel 'SELECT * FROM cpu;'
|
sql influx:///parallel 'SELECT * FROM cpu;'
|
||||||
sql influx:///parallel 'SELECT "host", "region", "value" FROM "cpu"'
|
sql influx:///parallel 'SELECT "host", "region", "value" FROM "cpu"'
|
||||||
sql --pretty influx:///parallel 'SELECT * FROM cpu;'
|
sql --pretty influx:///parallel 'SELECT * FROM cpu;'
|
||||||
|
|
|
@ -442,6 +442,22 @@ par_plus a/1 = a/1 = a/1. = a/1. = a/1. = a/1. = a/1. = a/1.
|
||||||
par_plus a.b/1.2 = a.b/1.2 = a.b/1.2 = a.b/1.2 = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2.
|
par_plus a.b/1.2 = a.b/1.2 = a.b/1.2 = a.b/1.2 = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2.
|
||||||
par_plus a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3. = a.b.c/1.2.3.
|
par_plus a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3. = a.b.c/1.2.3.
|
||||||
par_plus a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4
|
par_plus a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4
|
||||||
|
par_plus a. = /a. = a. = /a. = a.. = /a.. = a.. = /a..
|
||||||
|
par_plus a.b. = /a.b. = a.b. = /a.b. = a.b. = /a.b. = a.b.. = /a.b..
|
||||||
|
par_plus a.b.c. = /a.b.c. = a.b.c. = /a.b.c. = a.b.c. = /a.b.c. = a.b.c. = /a.b.c.
|
||||||
|
par_plus a.b.c.d. = /a.b.c.d. = a.b.c.d. = /a.b.c.d. = a.b.c.d. = /a.b.c.d. = a.b.c.d. = /a.b.c.d.
|
||||||
|
par_plus a/1. = a/1. = a/1. = a/1. = a/1.. = a/1.. = a/1.. = a/1..
|
||||||
|
par_plus a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2.. = a.b/1.2..
|
||||||
|
par_plus a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3.
|
||||||
|
par_plus a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4.
|
||||||
|
par_plus a.. = /a.. = a.. = /a.. = a.. = /a.. = a... = /a...
|
||||||
|
par_plus a.b.. = /a.b.. = a.b.. = /a.b.. = a.b.. = /a.b.. = a.b.. = /a.b..
|
||||||
|
par_plus a.b.c.. = /a.b.c.. = a.b.c.. = /a.b.c.. = a.b.c.. = /a.b.c.. = a.b.c.. = /a.b.c..
|
||||||
|
par_plus a.b.c.d.. = /a.b.c.d.. = a.b.c.d.. = /a.b.c.d.. = a.b.c.d.. = /a.b.c.d.. = a.b.c.d.. = /a.b.c.d..
|
||||||
|
par_plus a./1. = a./1. = a./1. = a./1. = a./1.. = a./1.. = a./1.. = a./1..
|
||||||
|
par_plus a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2..
|
||||||
|
par_plus a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3..
|
||||||
|
par_plus a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4..
|
||||||
par_plus ### Test {%...} {%%...} {#...} {##...}
|
par_plus ### Test {%...} {%%...} {#...} {##...}
|
||||||
par_plus z.foo
|
par_plus z.foo
|
||||||
par_plus z.foo
|
par_plus z.foo
|
||||||
|
|
|
@ -42,8 +42,8 @@ def 3
|
||||||
6
|
6
|
||||||
6
|
6
|
||||||
### Test --table-size --tablesize
|
### Test --table-size --tablesize
|
||||||
82
|
90
|
||||||
82
|
90
|
||||||
### Test --debug
|
### Test --debug
|
||||||
dburl mysql://tange:tange@localhost:3306/tange
|
dburl mysql://tange:tange@localhost:3306/tange
|
||||||
databasedriver mysql user tange password tange host localhost port 3306 database tange query
|
databasedriver mysql user tange password tange host localhost port 3306 database tange query
|
||||||
|
|
|
@ -9,16 +9,13 @@ par_influx name
|
||||||
par_influx ----
|
par_influx ----
|
||||||
par_influx _internal
|
par_influx _internal
|
||||||
par_influx mydb
|
par_influx mydb
|
||||||
|
par_influx myinflux
|
||||||
par_influx parallel
|
par_influx parallel
|
||||||
par_influx name: cpu
|
par_influx name: cpu
|
||||||
par_influx time host region value
|
par_influx time host region value
|
||||||
par_influx ---- ---- ------ -----
|
par_influx ---- ---- ------ -----
|
||||||
par_influx 0000000000000000000 serverA us_west 0.00
|
par_influx 0000000000000000000 serverA us_west 0.00
|
||||||
par_influx 0000000000000000000 serverA us_west 0.00
|
par_influx 0000000000000000000 serverA us_west 0.00
|
||||||
par_influx name: measurements
|
|
||||||
par_influx name
|
|
||||||
par_influx ----
|
|
||||||
par_influx cpu
|
|
||||||
par_influx name: cpu
|
par_influx name: cpu
|
||||||
par_influx time host region value
|
par_influx time host region value
|
||||||
par_influx ---- ---- ------ -----
|
par_influx ---- ---- ------ -----
|
||||||
|
|
Loading…
Reference in a new issue