From 42d4c352706a931e25a8a3e4cbcd446ad21599b6 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Tue, 16 Oct 2012 01:24:35 +0200 Subject: [PATCH] parallel.pod: --results example. --- src/parallel.pod | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/parallel.pod b/src/parallel.pod index 629a43ca..e98a73f8 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -988,9 +988,9 @@ Only used with B<--pipe>. Results in files named by tab separated arguments. Save the output into files. The file names will be prefixed with I which can contain a path with a prefix string. The file with output from stdout -(standard output) will prefixed with 'Istdout_'. The file +(standard output) will prefixed with 'Istdout'. The file with output from stderr (standard error) will prefixed with -'Istderr_'. +'Istderr'. The postfix is the header of the input source (if using B<--header :>) or the number of the input source followed by the value of the input @@ -1003,14 +1003,14 @@ E.g: will generate: - foo/barstderr_a I b III - foo/barstderr_a I b IIII - foo/barstderr_a II b III - foo/barstderr_a II b IIII - foo/barstdout_a I b III - foo/barstdout_a I b IIII - foo/barstdout_a II b III - foo/barstdout_a II b IIII + foo/barstderr a I b III + foo/barstderr a I b IIII + foo/barstderr a II b III + foo/barstderr a II b IIII + foo/barstdout a I b III + foo/barstdout a I b IIII + foo/barstdout a II b III + foo/barstdout a II b IIII and @@ -1018,14 +1018,14 @@ and will generate: - foo/barstderr_1 I 2 III - foo/barstderr_1 I 2 IIII - foo/barstderr_1 II 2 III - foo/barstderr_1 II 2 IIII - foo/barstdout_1 I 2 III - foo/barstdout_1 I 2 IIII - foo/barstdout_1 II 2 III - foo/barstdout_1 II 2 IIII + foo/barstderr 1 I 2 III + foo/barstderr 1 I 2 IIII + foo/barstderr 1 II 2 III + foo/barstderr 1 II 2 IIII + foo/barstdout 1 I 2 III + foo/barstdout 1 I 2 IIII + foo/barstdout 1 II 2 III + foo/barstdout 1 II 2 IIII where all spaces are TABs (\t);. @@ -1859,6 +1859,16 @@ This also works if the input file is a file with columns: cat addressbook.tsv | parallel --colsep '\t' --header : echo {Name} {E-mail address} +=head1 EXAMPLE: Count the differences between all files in a dir + +Using B<--results> the results are saved in /tmp/diffcount*. + + parallel --results /tmp/diffcount "diff -U 0 {1} {2} |tail -n +3 |grep -v '^@'|wc -l" ::: * ::: * + +To see the difference between file A and file B look at the file +'/tmp/diffcount 1 A 2 B' where spaces are TABs (\t). + + =head1 EXAMPLE: Speeding up fast jobs Starting a job on the local machine takes around 3 ms. This can be a