2010-12-02 23:04:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2012-05-05 22:02:08 +00:00
|
|
|
cat <<'EOF' | parallel -j0 -k
|
2010-12-02 23:04:12 +00:00
|
|
|
echo "### Test --basenamereplace"
|
2011-01-11 12:42:14 +00:00
|
|
|
parallel -j1 -k -X --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2010-12-02 23:04:12 +00:00
|
|
|
parallel -k --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
|
|
|
|
2011-07-16 23:46:02 +00:00
|
|
|
echo "### Test --bnr"
|
|
|
|
parallel -j1 -k -X --bnr FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
|
|
|
parallel -k --bnr FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
|
|
|
|
2012-04-24 21:59:29 +00:00
|
|
|
echo "### Test --extensionreplace"
|
|
|
|
parallel -j1 -k -X --extensionreplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
|
|
|
parallel -k --extensionreplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
|
|
|
|
|
|
|
echo "### Test --er"
|
|
|
|
parallel -j1 -k -X --er FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
|
|
|
parallel -k --er FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
|
|
|
|
2010-12-02 23:04:12 +00:00
|
|
|
echo "### Test --basenameextensionreplace"
|
2011-01-11 12:42:14 +00:00
|
|
|
parallel -j1 -k -X --basenameextensionreplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2010-12-02 23:04:12 +00:00
|
|
|
parallel -k --basenameextensionreplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
|
|
|
|
2011-07-16 23:46:02 +00:00
|
|
|
echo "### Test --bner"
|
|
|
|
parallel -j1 -k -X --bner FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
|
|
|
parallel -k --bner FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
|
|
|
|
2010-12-02 23:04:12 +00:00
|
|
|
echo "### Test {/}"
|
2011-01-11 12:42:14 +00:00
|
|
|
parallel -j1 -k -X echo {/} ::: /a/b.c a/b.c b.c /a/b a/b b
|
2010-12-02 23:04:12 +00:00
|
|
|
|
|
|
|
echo "### Test {/.}"
|
2011-01-11 12:42:14 +00:00
|
|
|
parallel -j1 -k -X echo {/.} ::: /a/b.c a/b.c b.c /a/b a/b b
|
2010-12-02 23:04:12 +00:00
|
|
|
|
|
|
|
echo "### Test {#/.}"
|
2011-01-11 12:42:14 +00:00
|
|
|
parallel -j1 -k -X echo {2/.} ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6
|
2010-12-02 23:04:12 +00:00
|
|
|
|
|
|
|
echo "### Test {#/}"
|
2011-01-11 12:42:14 +00:00
|
|
|
parallel -j1 -k -X echo {2/} ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6
|
2010-12-02 23:04:12 +00:00
|
|
|
|
|
|
|
echo "### Test {#.}"
|
2011-01-11 12:42:14 +00:00
|
|
|
parallel -j1 -k -X echo {2.} ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6
|
2010-12-02 23:04:12 +00:00
|
|
|
|
2012-05-05 22:02:08 +00:00
|
|
|
echo "### bug #34241: --pipe should not spawn unneeded processes"
|
|
|
|
echo | parallel -r -j2 -N1 --pipe md5sum -c && echo OK
|
|
|
|
EOF
|