From f69a6d52f1c60b02f4aed6a7ed821b3e48e9141d Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sun, 10 Jul 2011 16:33:33 +0200 Subject: [PATCH] parallel.pod: explain no replacement string => {} is appended. --- doc/release_new_version | 7 +++ src/parallel.pod | 114 ++++++++++++++++++++++++++++------------ 2 files changed, 87 insertions(+), 34 deletions(-) diff --git a/doc/release_new_version b/doc/release_new_version index 588e8bec..f3e558e4 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -195,6 +195,13 @@ New in this release: * GNU Parallel was presented at Nordic Perl Workshop 2011. http://conferences.yapceurope.org/npw2011/talk/3416 +* Blog post about zcat and GNU Parallel. Thanks to Dr. John. + http://drjohnstechtalk.com/blog/2011/06/gnu-parallel-really-helps-with-zcat/ + +* 2 blog posts in Japanese. Thanks to Negima. + http://d.hatena.ne.jp/negima1976/20110607/1307412660 + http://d.hatena.ne.jp/negima1976/20110628/1309252494 + * Bug fixes and man page updates. diff --git a/src/parallel.pod b/src/parallel.pod index efd92301..f25b825d 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -72,66 +72,84 @@ http://www.perlmonks.org/index.pl?node_id=484296). =item B<{}> (still alpha testing) -Input line. This is the default replacement string and will normally -be used for putting the argument in the command line. It can be -changed with B<-I>. +Input line. This replacement string will be replaced by a full line +read from the input source. + +The replacement string B<{}> can be changed with B<-I>. + +If the command line contains no replacement strings then B<{}> will be +appended to the command line. =item B<{.}> (still alpha testing) -Input line without extension. This is a specialized replacement string -with the extension removed. If the input line contains B<.> after the -last B the last B<.> till the end of the string will be removed and -B<{.}> will be replaced with the remaining. E.g. I becomes -I, I becomes I, I -becomes I, I remains I. If the -input line does not contain B<.> it will remain unchanged. +Input line without extension. This replacement string will be replaced +by the input with the extension removed. If the input line contains +B<.> after the last B the last B<.> till the end of the string will +be removed and B<{.}> will be replaced with the +remaining. E.g. I becomes I, I becomes +I, I becomes I, +I remains I. If the input line does not +contain B<.> it will remain unchanged. -B<{.}> can be used the same places as B<{}>. The replacement string -B<{.}> can be changed with B<-U>. +The replacement string B<{.}> can be changed with B<-U>. + +To understand replacement strings see B<{}>. =item B<{/}> (still alpha testing) -Basename of input line. This is a specialized replacement string -with the directory part removed. +Basename of input line. This replacement string will be replaced by +the input with the directory part removed. -B<{/}> can be used the same places as B<{}>. The replacement string -B<{/}> can be changed with B<--basenamereplace>. +The replacement string B<{/}> can be changed with +B<--basenamereplace>. + +To understand replacement strings see B<{}>. =item B<{//}> (still alpha testing) -Dirname of input line. This is a specialized replacement string -containing the dir of the input. See B(1). +Dirname of input line. This replacement string will be replaced by the +dir of the input line. See B(1). -B<{//}> can be used the same places as B<{}>. The replacement string -B<{//}> can be changed with B<--dirnamereplace>. +The replacement string B<{//}> can be changed with +B<--dirnamereplace>. + +To understand replacement strings see B<{}>. =item B<{/.}> (still alpha testing) -Basename of input line without extension. This is a specialized -replacement string with the directory and extension part removed. It -is a combination of B<{/}> and B<{.}>. +Basename of input line without extension. This replacement string will +be replaced by the input with the directory and extension part +removed. It is a combination of B<{/}> and B<{.}>. -B<{/.}> can be used the same places as B<{}>. The replacement string -B<{/.}> can be changed with B<--basenameextensionreplace>. +The replacement string B<{/.}> can be changed with +B<--basenameextensionreplace>. + +To understand replacement strings see B<{}>. =item B<{#}> (still alpha testing) -Sequence number of the job to run. The same as $PARALLEL_SEQ. +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 +same number as $PARALLEL_SEQ. The replacement string B<{#}> can be changed with B<--seqreplace>. +To understand replacement strings see B<{}>. + =item B<{>IB<}> (still alpha testing) -Argument from input source I or the I'th argument. See B<-a> -and B<-N>. +Argument from input source I or the I'th argument. This +positional replacement string will be replaced by the input from input +source I (when used with B<-a> or B<::::>) or with the I'th +argument (when used with B<-N>). -B<{>IB<}> can be used the same places as B<{}>. +To understand replacement strings see B<{}>. =item B<{>I.B<}> (still alpha testing) @@ -139,24 +157,39 @@ B<{>IB<}> can be used the same places as B<{}>. Argument from input source I or the I'th argument without extension. It is a combination of B<{>IB<}> and B<{.}>. -B<{>I.B<}> can be used the same places as B<{>IB<}>. +This positional replacement string will be replaced by the input from +input source I (when used with B<-a> or B<::::>) or with the +I'th argument (when used with B<-N>). The input will have the +extension removed. + +To understand positional replacement strings see B<{>IB<}>. =item B<{>I/B<}> (still alpha testing) Basename of argument from input source I or the I'th argument. -It is a combination of B<{>IB<}> and B<{/}>. See B<-a> and B<-N>. +It is a combination of B<{>IB<}> and B<{/}>. -B<{>I/B<}> can be used the same places as B<{>IB<}>. +This positional replacement string will be replaced by the input from +input source I (when used with B<-a> or B<::::>) or with the +I'th argument (when used with B<-N>). The input will have the +directory (if any) removed. + +To understand positional replacement strings see B<{>IB<}>. =item B<{>I/.B<}> (still alpha testing) Basename of argument from input source I or the I'th argument without extension. It is a combination of B<{>IB<}>, B<{/}>, and -B<{.}>. See B<-a> and B<-N>. +B<{.}>. -B<{>I/.B<}> can be used the same places as B<{>IB<}>. +This positional replacement string will be replaced by the input from +input source I (when used with B<-a> or B<::::>) or with the +I'th argument (when used with B<-N>). The input will have the +directory (if any) and extension removed. + +To understand positional replacement strings see B<{>IB<}>. =item B<:::> I (alpha testing) @@ -608,6 +641,19 @@ that specify their own ssh command. =item B<--xargs> +Multiple arguments. Insert as many arguments as the command line +length permits. + +If B<{}> is not used the arguments will be appended to the +line. If B<{}> is used multiple times each B<{}> will be replaced +with all the arguments. + +Support for B<--xargs> with B<--sshlogin> is limited and may fail. + +See also B<-X> for context replace. If in doubt use B<-X> as that will +most likely do what is needed. + + =item B<-m> Multiple arguments. Insert as many arguments as the command line