Fixed bug #43654: --bar with command not using {}.

This commit is contained in:
Ole Tange 2014-11-23 01:31:33 +01:00
parent 2c9971729b
commit d94aa91ad1
6 changed files with 21 additions and 10 deletions

4
NEWS
View file

@ -15,8 +15,8 @@
db-or-web-arg@db+web db-only-arg@db Thanks to Michel Courtine for
developing a prototype for this.
* HTSeq-Hadoop: Extending HTSeq for Massively Parallel Sequencing Data
Analysis using Hadoop
* GNU Parallel was cited in: HTSeq-Hadoop: Extending HTSeq for
Massively Parallel Sequencing Data Analysis using Hadoop
http://essenceofescience.se/wp-content/uploads/2014/11/Siretskiy.pdf
* GNU Parallel was cited in: SlideToolkit: An Assistive Toolset for

View file

@ -247,7 +247,7 @@ New in this release:
* With --hostgroup you can restrict arguments to certain hostgroups by appending '@groupname' to the argument. Multiple groups can be given by separating groups with '+'. E.g. my_web_arg@web db-or-web-arg@db+web db-only-arg@db Thanks to Michel Courtine for developing a prototype for this.
* HTSeq-Hadoop: Extending HTSeq for Massively Parallel Sequencing Data Analysis using Hadoop http://essenceofescience.se/wp-content/uploads/2014/11/Siretskiy.pdf
* GNU Parallel was cited in: HTSeq-Hadoop: Extending HTSeq for Massively Parallel Sequencing Data Analysis using Hadoop http://essenceofescience.se/wp-content/uploads/2014/11/Siretskiy.pdf
* GNU Parallel was cited in: SlideToolkit: An Assistive Toolset for the Histological Quantification of Whole Slide Images http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0110289#close

View file

@ -781,7 +781,7 @@ sub get_options_from_array {
sub parse_options {
# Returns: N/A
# Defaults:
$Global::version = 20141122;
$Global::version = 20141123;
$Global::progname = 'parallel';
$Global::infinity = 2**31;
$Global::debug = 0;
@ -6935,6 +6935,10 @@ sub new {
$replacecount{$1}||=1;
}
}
if($opt::bar) {
# If the command does not contain {} force it to be computed
$replacecount{""}||=1;
}
$len{'context'} = 0+$contextlen;
$len{'noncontext'} = $noncontextlen;

View file

@ -162,7 +162,7 @@ B<--basenameextensionreplace>.
To understand replacement strings see B<{}>.
=item B<{#}> (beta testing)
=item B<{#}>
Sequence number of the job to run. This replacement string will be
replaced by the sequence number of the job being run. It contains the
@ -173,7 +173,7 @@ The replacement string B<{#}> can be changed with B<--seqreplace>.
To understand replacement strings see B<{}>.
=item B<{%}> (beta testing)
=item B<{%}>
Job slot number. This replacement string will be replaced by the job's
slot number between 1 and number of jobs to run in parallel. There
@ -563,7 +563,7 @@ If I<eof-str> is omitted, there is no end of file string. If neither
B<-E> nor B<-e> is used, no end of file string is used.
=item B<--env> I<var> (beta testing)
=item B<--env> I<var>
Copy environment variable I<var>. This will copy I<var> to the
environment that the command is run in. This is especially useful for
@ -729,9 +729,9 @@ B<--header :> is an alias for B<--header '.*\n'>.
If I<regexp> is a number, it is a fixed number of lines.
=item B<--hostgroups> (alpha testing)
=item B<--hostgroups> (beta testing)
=item B<--hgrp> (alpha testing)
=item B<--hgrp> (beta testing)
Enable hostgroups on arguments. If an argument contains '@' the string
after '@' will be removed and treated as a list of hostgroups on which
@ -3275,7 +3275,7 @@ by: B<kill -TERM $PARALLEL_PID>. This only works on the local
computer.
=item $PARALLEL_SHELL (beta testing)
=item $PARALLEL_SHELL
Use this shell the shell for the commands run by GNU Parallel:

View file

@ -1,6 +1,9 @@
#!/bin/bash
cat <<'EOF' | parallel -vj0 -k
echo "bug #43654: --bar with command not using {}"
COLUMNS=80 stdout parallel --bar true {.} ::: 1
echo "### Test --basenamereplace"
parallel -j1 -k -X --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
parallel -k --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b

View file

@ -1,3 +1,7 @@
echo "bug #43654: --bar with command not using {}"
bug #43654: --bar with command not using {}
COLUMNS=80 stdout parallel --bar true {.} ::: 1
# 0 sec 1 0 0% 0:1=0s 1  # 0 sec 1 100 100% 1:0=0s 1 
echo "### Test --basenamereplace"
### Test --basenamereplace
parallel -j1 -k -X --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b