mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 23:47:53 +00:00
parallel: implemented /etc/parallel/config. Passes testsuite.
This commit is contained in:
parent
b7d707b346
commit
c535c25450
|
@ -147,12 +147,19 @@ at: http://ftp.gnu.org/gnu/parallel/
|
||||||
|
|
||||||
New in this release:
|
New in this release:
|
||||||
|
|
||||||
|
* --tollef to be switch compatible with Tollef's parallel.
|
||||||
|
|
||||||
|
* Site wide config file: /etc/parallel/config
|
||||||
|
|
||||||
* Opscode Cookbook for Chef. Thanks to Joshua Timberman.
|
* Opscode Cookbook for Chef. Thanks to Joshua Timberman.
|
||||||
https://github.com/opscode/cookbooks/tree/master/gnu_parallel
|
https://github.com/opscode/cookbooks/tree/master/gnu_parallel
|
||||||
|
|
||||||
* The examples translated into Japanese. Thanks to Koshigoe.
|
* Man page examples translated into Japanese. Thanks to Koshigoe.
|
||||||
http://w.koshigoe.jp/study/?%5Bsystem%5D+GNU+parallel+%BB%C8%CD%D1%CE%E3#l13
|
http://w.koshigoe.jp/study/?%5Bsystem%5D+GNU+parallel+%BB%C8%CD%D1%CE%E3#l13
|
||||||
|
|
||||||
|
* Review with examples in German. Thanks to M. Nieberg.
|
||||||
|
http://kenntwas.de/2011/linux/gnu-parallel/
|
||||||
|
|
||||||
* A review of the --pipe option in German. Thanks to Mathias Huber.
|
* A review of the --pipe option in German. Thanks to Mathias Huber.
|
||||||
http://www.linux-magazin.de/NEWS/GNU-Parallel-20110205-stueckelt-Daten
|
http://www.linux-magazin.de/NEWS/GNU-Parallel-20110205-stueckelt-Daten
|
||||||
|
|
||||||
|
|
|
@ -574,7 +574,9 @@ sub read_options {
|
||||||
# Add options from .parallel/config and other profiles
|
# Add options from .parallel/config and other profiles
|
||||||
my @ARGV_profile = ();
|
my @ARGV_profile = ();
|
||||||
my @ARGV_env = ();
|
my @ARGV_env = ();
|
||||||
my @config_profiles = ($ENV{'HOME'}."/.parallel/config",
|
my @config_profiles = (
|
||||||
|
"/etc/parallel/config",
|
||||||
|
$ENV{'HOME'}."/.parallel/config",
|
||||||
$ENV{'HOME'}."/.parallelrc");
|
$ENV{'HOME'}."/.parallelrc");
|
||||||
my @profiles = @config_profiles;
|
my @profiles = @config_profiles;
|
||||||
if($::opt_profile) {
|
if($::opt_profile) {
|
||||||
|
|
|
@ -6,8 +6,8 @@ echo '### Test -p --interactive'
|
||||||
cat >/tmp/parallel-script-for-expect <<_EOF
|
cat >/tmp/parallel-script-for-expect <<_EOF
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
seq 1 3 | parallel -k -p echo opt-p
|
seq 1 3 | parallel -k -p "sleep 0.1; echo opt-p"
|
||||||
seq 1 3 | parallel -k --interactive echo opt--interactive
|
seq 1 3 | parallel -k --interactive "sleep 0.1; echo opt--interactive"
|
||||||
_EOF
|
_EOF
|
||||||
chmod 755 /tmp/parallel-script-for-expect
|
chmod 755 /tmp/parallel-script-for-expect
|
||||||
|
|
||||||
|
|
|
@ -78,13 +78,13 @@ echo 12a34b45a6 |
|
||||||
parallel -k --pipe --recend 'b' --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
parallel -k --pipe --recend 'b' --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
||||||
|
|
||||||
echo '### Test -N even'
|
echo '### Test -N even'
|
||||||
seq 1 10 | parallel -j2 -k -N 2 --pipe cat";echo ole;sleep 0.1"
|
seq 1 10 | parallel -j2 -k -N 2 --pipe cat";echo ole;sleep 0.\$PARALLEL_SEQ"
|
||||||
|
|
||||||
echo '### Test -N odd'
|
echo '### Test -N odd'
|
||||||
seq 1 11 | parallel -j2 -k -N 2 --pipe cat";echo ole;sleep 0.1"
|
seq 1 11 | parallel -j2 -k -N 2 --pipe cat";echo ole;sleep 0.\$PARALLEL_SEQ"
|
||||||
|
|
||||||
echo '### Test -N even+2'
|
echo '### Test -N even+2'
|
||||||
seq 1 12 | parallel -j2 -k -N 2 --pipe cat";echo ole;sleep 0.1"
|
seq 1 12 | parallel -j2 -k -N 2 --pipe cat";echo ole;sleep 0.\$PARALLEL_SEQ"
|
||||||
|
|
||||||
echo '### Test --recstart + --recend'
|
echo '### Test --recstart + --recend'
|
||||||
cat /tmp/blocktest | parallel -k --recstart 44 --recend "44" -j10 --pipe sort -n |md5sum
|
cat /tmp/blocktest | parallel -k --recstart 44 --recend "44" -j10 --pipe sort -n |md5sum
|
||||||
|
|
|
@ -1,10 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo '### Test --tollef'
|
echo '### Test --tollef'
|
||||||
parallel --tollef echo -- 1 2 3
|
parallel -k --tollef echo -- 1 2 3 ::: a b c
|
||||||
|
|
||||||
echo '### Test --tollef --gnu'
|
echo '### Test --tollef --gnu'
|
||||||
parallel --tollef --gnu echo ::: 1 2 3
|
parallel -k --tollef --gnu echo ::: 1 2 3 -- a b c
|
||||||
|
|
||||||
echo '### Test --gnu'
|
echo '### Test --gnu'
|
||||||
parallel --gnu echo ::: 1 2 3
|
parallel -k --gnu echo ::: 1 2 3 -- a b c
|
||||||
|
|
||||||
|
echo "### test global config"
|
||||||
|
echo /etc/parallel/config | sudo parallel "echo --tollef > "
|
||||||
|
parallel -k echo -- 1 2 3 ::: a b c
|
||||||
|
parallel -k --gnu echo ::: 1 2 3 -- a b c
|
||||||
|
echo --gnu > ~/.parallel/config
|
||||||
|
parallel -k echo ::: 1 2 3 -- a b c
|
||||||
|
parallel -k --gnu echo ::: 1 2 3 -- a b c
|
||||||
|
sudo rm /etc/parallel/config
|
||||||
|
rm ~/.parallel/config
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
### Test -p --interactive
|
### Test -p --interactive
|
||||||
spawn /tmp/parallel-script-for-expect
|
spawn /tmp/parallel-script-for-expect
|
||||||
echo opt-p 1 ?...y
|
sleep 0.1; echo opt-p 1 ?...y
|
||||||
echo opt-p 2 ?...n
|
sleep 0.1; echo opt-p 2 ?...n
|
||||||
|
sleep 0.1; echo opt-p 3 ?...y
|
||||||
opt-p 1
|
opt-p 1
|
||||||
echo opt-p 3 ?...y
|
|
||||||
opt-p 3
|
opt-p 3
|
||||||
echo opt--interactive 1 ?...y
|
sleep 0.1; echo opt--interactive 1 ?...y
|
||||||
echo opt--interactive 2 ?...n
|
sleep 0.1; echo opt--interactive 2 ?...n
|
||||||
|
sleep 0.1; echo opt--interactive 3 ?...y
|
||||||
opt--interactive 1
|
opt--interactive 1
|
||||||
echo opt--interactive 3 ?...y
|
|
||||||
opt--interactive 3
|
opt--interactive 3
|
||||||
### Test -L -l and --max-lines
|
### Test -L -l and --max-lines
|
||||||
a_b
|
a_b
|
||||||
|
|
|
@ -132,7 +132,6 @@ ole
|
||||||
9
|
9
|
||||||
10
|
10
|
||||||
ole
|
ole
|
||||||
ole
|
|
||||||
### Test -N odd
|
### Test -N odd
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
|
|
|
@ -2,11 +2,52 @@
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
3
|
3
|
||||||
|
:::
|
||||||
|
a
|
||||||
|
b
|
||||||
|
c
|
||||||
### Test --tollef --gnu
|
### Test --tollef --gnu
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
3
|
3
|
||||||
|
--
|
||||||
|
a
|
||||||
|
b
|
||||||
|
c
|
||||||
### Test --gnu
|
### Test --gnu
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
3
|
3
|
||||||
|
--
|
||||||
|
a
|
||||||
|
b
|
||||||
|
c
|
||||||
|
### test global config
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
:::
|
||||||
|
a
|
||||||
|
b
|
||||||
|
c
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
--
|
||||||
|
a
|
||||||
|
b
|
||||||
|
c
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
--
|
||||||
|
a
|
||||||
|
b
|
||||||
|
c
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
--
|
||||||
|
a
|
||||||
|
b
|
||||||
|
c
|
||||||
|
|
Loading…
Reference in a new issue