2010-10-26 23:50:58 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
rsync -Ha --delete input-files/testdir/ tmp/
|
|
|
|
cd tmp
|
|
|
|
|
|
|
|
SERVER2=parallel@parallel-server2
|
|
|
|
|
|
|
|
echo $SERVER2 >~/.parallel/sshloginfile
|
|
|
|
|
2012-01-08 18:52:00 +00:00
|
|
|
echo '### Test --wd newtempdir/newdir/tmp/ with space dirs'
|
2010-10-26 23:50:58 +00:00
|
|
|
ssh $SERVER2 rm -rf newtempdir
|
2012-01-08 18:52:00 +00:00
|
|
|
stdout parallel -k --wd newtempdir/newdir/tmp/ --basefile 1-col.txt --trc {}.6 -S .. -v echo ">"{}.6 ::: './ ab/c"d/ef g' ' ab/c"d/efg' ./b/bar ./b/foo "./ ab /c' d/ ef\"g" ./2-col.txt './a b/cd / ef/efg'
|
2010-10-26 23:50:58 +00:00
|
|
|
# A few rmdir errors are OK as we have multiple files in the same dirs
|
2012-10-22 06:32:39 +00:00
|
|
|
find . -name '*.6' | sort
|
2010-10-26 23:50:58 +00:00
|
|
|
|
2012-01-08 18:52:00 +00:00
|
|
|
echo '### Test --wd /tmp/newtempdir/newdir/tmp/ with space dirs'
|
2010-10-26 23:50:58 +00:00
|
|
|
ssh $SERVER2 rm -rf /tmp/newtempdir
|
2012-01-08 18:52:00 +00:00
|
|
|
stdout parallel -k --wd /tmp/newtempdir/newdir/tmp/ --basefile 1-col.txt --trc {}.7 -S .. -v echo ">"{}.7 ::: './ ab/c"d/ef g' ' ab/c"d/efg' ./b/bar ./b/foo "./ ab /c' d/ ef\"g" ./2-col.txt './a b/cd / ef/efg'
|
2010-10-26 23:50:58 +00:00
|
|
|
# A few rmdir errors are OK as we have multiple files in the same dirs
|
2012-10-22 06:32:39 +00:00
|
|
|
find . -name '*.7' | sort
|
2010-10-26 23:50:58 +00:00
|
|
|
|
|
|
|
echo '### Test --workdir ...'
|
|
|
|
parallel -k --workdir ... --basefile 1-col.txt --trc {}.1 -S .. echo ">"{}.1 ::: 2-col.txt
|
2012-10-22 06:32:39 +00:00
|
|
|
find . -name '*.1' | sort
|
2010-10-26 23:50:58 +00:00
|
|
|
|
2012-01-08 18:52:00 +00:00
|
|
|
echo '### Test --wd ...'
|
|
|
|
parallel -k --wd ... --basefile 1-col.txt --trc {}.2 -S .. -v echo ">"{}.2 ::: 2-col.txt
|
2012-10-22 06:32:39 +00:00
|
|
|
find . -name '*.2' | sort
|
2010-10-26 23:50:58 +00:00
|
|
|
|
2012-01-08 18:52:00 +00:00
|
|
|
echo '### Test --wd ... with space dirs'
|
|
|
|
stdout parallel -k --wd ... --basefile 1-col.txt --trc {}.3 -S .. -v echo ">"{}.3 ::: './ ab/c"d/ef g' ' ab/c"d/efg' ./b/bar ./b/foo "./ ab /c' d/ ef\"g" ./2-col.txt './a b/cd / ef/efg'
|
2010-10-26 23:50:58 +00:00
|
|
|
# A few rmdir errors are OK as we have multiple files in the same dirs
|
2012-10-22 06:32:39 +00:00
|
|
|
find . -name '*.3' | sort
|
2010-10-26 23:50:58 +00:00
|
|
|
|
2012-01-08 18:52:00 +00:00
|
|
|
echo '### Test --wd tmpdir'
|
|
|
|
parallel -k --wd tmpdir --basefile 1-col.txt --trc {}.4 -S .. -v echo ">"{}.4 ::: 2-col.txt
|
2012-10-22 06:32:39 +00:00
|
|
|
find . -name '*.4' | sort
|
2010-10-26 23:50:58 +00:00
|
|
|
|
2012-01-08 18:52:00 +00:00
|
|
|
echo '### Test --wd /tmp/ with space dirs'
|
|
|
|
stdout parallel -k --wd /tmp/ --basefile 1-col.txt --trc {}.5 -S .. -v echo ">"{}.5 ::: './ ab/c"d/ef g' ' ab/c"d/efg' ./b/bar ./b/foo "./ ab /c' d/ ef\"g" ./2-col.txt './a b/cd / ef/efg'
|
2010-10-26 23:50:58 +00:00
|
|
|
# A few rmdir errors are OK as we have multiple files in the same dirs
|
2012-10-22 06:32:39 +00:00
|
|
|
find . -name '*.5' | sort
|
2010-10-26 23:50:58 +00:00
|
|
|
|
|
|
|
cd ..
|
|
|
|
rm -rf tmp
|