2010-07-31 21:19:48 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo '### Test of quoting of > bug'
|
|
|
|
echo '>/dev/null' | parallel echo
|
|
|
|
|
|
|
|
echo '### Test of quoting of > bug if line continuation'
|
|
|
|
(echo '> '; echo '> '; echo '>') | parallel --max-lines 3 echo
|
|
|
|
|
|
|
|
echo '### Test of --trim illegal'
|
|
|
|
stdout parallel --trim fj ::: echo
|
|
|
|
|
2010-08-01 18:09:31 +00:00
|
|
|
echo '### Test of eof string on :::'
|
2010-08-16 22:25:11 +00:00
|
|
|
parallel -k -E ole echo ::: foo ole bar
|
2010-08-01 18:09:31 +00:00
|
|
|
|
|
|
|
echo '### Test of ignore-empty string on :::'
|
2010-08-14 20:51:09 +00:00
|
|
|
parallel -k -r echo ::: foo '' ole bar
|
2010-08-01 18:09:31 +00:00
|
|
|
|
|
|
|
echo '### Test of trailing space continuation'
|
|
|
|
(echo foo; echo '';echo 'ole ';echo bar;echo quux) | xargs -r -L2 echo
|
|
|
|
(echo foo; echo '';echo 'ole ';echo bar;echo quux) | parallel -kr -L2 echo
|
|
|
|
parallel -kr -L2 echo ::: foo '' 'ole ' bar quux
|
|
|
|
(echo foo; echo '';echo 'ole ';echo bar;echo quux) | xargs -r -L2 -E bar echo
|
|
|
|
(echo foo; echo '';echo 'ole ';echo bar;echo quux) | parallel -kr -L2 -E bar echo
|
|
|
|
parallel -kr -L2 -E bar echo ::: foo '' 'ole ' bar quux
|
|
|
|
|
2010-07-31 21:19:48 +00:00
|
|
|
echo '### Test of --colsep'
|
|
|
|
echo 'a%c%b' | parallel --colsep % echo {1} {3} {2}
|
|
|
|
(echo 'a%c%b'; echo a%c%b%d) | parallel -k --colsep % echo {1} {3} {2} {4}
|
|
|
|
(echo a%c%b; echo d%f%e) | parallel -k --colsep % echo {1} {3} {2}
|
|
|
|
parallel -k --colsep % echo {1} {3} {2} ::: a%c%b d%f%e
|
|
|
|
|
|
|
|
parallel -k --colsep % echo {1} {3} {2} ::: a%c%b
|
|
|
|
|
|
|
|
parallel -k --colsep % echo {1} {3} {2} {4} ::: a%c%b a%c%b%d
|
|
|
|
|
2010-08-01 18:09:31 +00:00
|
|
|
echo '### Test of tab as colsep'
|
|
|
|
printf 'def\tabc\njkl\tghi' | parallel -k --colsep '\t' echo {2} {1}
|
|
|
|
parallel -k -a <(printf 'def\tabc\njkl\tghi') --colsep '\t' echo {2} {1}
|
|
|
|
|
|
|
|
echo '### Test of quoting after colsplit'
|
|
|
|
parallel --colsep % echo {2} {1} ::: '>/dev/null%>/tmp/null'
|
|
|
|
|
2010-07-31 21:19:48 +00:00
|
|
|
echo '### Test of --colsep as regexp'
|
|
|
|
(echo 'a%c%%b'; echo a%c%b%d) | parallel -k --colsep %+ echo {1} {3} {2} {4}
|
|
|
|
|
|
|
|
parallel -k --colsep %+ echo {1} {3} {2} {4} ::: a%c%%b a%c%b%d
|
|
|
|
|
|
|
|
|
|
|
|
(echo 'a% c %%b'; echo a%c% b %d) | parallel -k --colsep %+ echo {1} {3} {2} {4}
|
|
|
|
|
|
|
|
(echo 'a% c %%b'; echo a%c% b %d) | parallel -k --colsep %+ echo '"{1}_{3}_{2}_{4}"'
|
|
|
|
echo '### Test of -C'
|
|
|
|
(echo 'a% c %%b'; echo a%c% b %d) | parallel -k -C %+ echo '"{1}_{3}_{2}_{4}"'
|
|
|
|
echo '### Test of --trim n'
|
|
|
|
(echo 'a% c %%b'; echo a%c% b %d) | parallel -k --trim n --colsep %+ echo '"{1}_{3}_{2}_{4}"'
|
|
|
|
parallel -k -C %+ echo '"{1}_{3}_{2}_{4}"' ::: 'a% c %%b' 'a%c% b %d'
|