2015-04-04 14:37:32 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-04-22 22:15:23 +00:00
|
|
|
find {$TMPDIR,/var/tmp,/tmp}/{fif,tms,par[^a]}* -mmin -10 2>/dev/null | parallel rm
|
2015-04-04 14:37:32 +00:00
|
|
|
cd testsuite 2>/dev/null
|
2015-04-09 23:20:51 +00:00
|
|
|
rm -rf tmp
|
|
|
|
mkdir tmp
|
2015-04-04 14:37:32 +00:00
|
|
|
cd tmp
|
2015-06-21 08:39:48 +00:00
|
|
|
touch ~/.parallel/will-cite
|
2015-04-04 14:37:32 +00:00
|
|
|
echo '### test parallel_tutorial'
|
|
|
|
rm -f /tmp/runs
|
|
|
|
export SERVER1=parallel@lo
|
|
|
|
export SERVER2=csh@lo
|
|
|
|
export PARALLEL=-k
|
|
|
|
perl -ne '$/="\n\n"; /^Output/../^[^O]\S/ and next; /^ / and print;' ../../src/parallel_tutorial.pod |
|
|
|
|
egrep -v 'curl|tty|parallel_tutorial|interactive|example.(com|net)|shellquote|works' |
|
|
|
|
perl -pe 's/username@//;s/user@//;
|
2016-04-11 20:19:28 +00:00
|
|
|
s/zenity/zenity --timeout=15/;
|
2015-04-04 14:37:32 +00:00
|
|
|
s:/usr/bin/time:/usr/bin/time -f %e:;
|
|
|
|
s:ignored_vars:ignored_vars|sort:;
|
2015-04-14 22:55:09 +00:00
|
|
|
# Remove \n to join all joblogs into the previous block
|
|
|
|
s:cat /tmp/log\n:cat /tmp/log;:;
|
2016-01-23 08:54:05 +00:00
|
|
|
# Remove import (python code)
|
|
|
|
s:import.*::;
|
2015-04-09 23:20:51 +00:00
|
|
|
# When parallelized: Sleep to make sure the abc-files are made
|
|
|
|
/%head1/ and $_.="sleep .3\n\n"x10;
|
2015-04-04 14:37:32 +00:00
|
|
|
' |
|
2015-08-04 05:54:40 +00:00
|
|
|
stdout parallel --joblog /tmp/jl-`basename $0` -j6 -vd'\n\n' |
|
2015-04-04 14:37:32 +00:00
|
|
|
perl -pe '$|=1;
|
2015-04-19 00:55:17 +00:00
|
|
|
# --tmux
|
2015-05-21 21:02:55 +00:00
|
|
|
s:(/tmp\S+)(tms).....:$1$2XXXXX:;
|
2015-04-19 00:55:17 +00:00
|
|
|
# --files
|
2015-04-22 22:15:23 +00:00
|
|
|
s:(/tmp\S+par).....(\....):$1XXXXX$2:;
|
2015-04-04 14:37:32 +00:00
|
|
|
# --eta --progress
|
|
|
|
s/ETA.*//g; s/local:.*//g;
|
|
|
|
# Sat Apr 4 11:55:40 CEST 2015
|
|
|
|
s/... ... .. ..:..:.. \D+ ..../DATE OUTPUT/;
|
|
|
|
# Timestamp from --joblog
|
|
|
|
s/\d{10}.\d{3}\s+..\d+/TIMESTAMP\t9.999/g;
|
2015-05-10 13:02:07 +00:00
|
|
|
# Version
|
|
|
|
s/201\d{5}/VERSION/g;
|
2015-05-20 19:09:33 +00:00
|
|
|
# [123] [abc] [ABC]
|
|
|
|
s/^[123] [abc] [ABC]$/123 abc ABC/g;
|
2015-04-04 14:37:32 +00:00
|
|
|
# Remote script
|
|
|
|
s/(PARALLEL_PID\D+)\d+/${1}000000/g;
|
2016-03-20 22:57:25 +00:00
|
|
|
# sql timing
|
|
|
|
s/,:,\d+.\d+,\d+.\d+/,:,000000000.000,0.000/g;
|
2015-04-04 14:37:32 +00:00
|
|
|
# /usr/bin/time -f %e
|
|
|
|
s/^(\d+)\.\d+$/$1/;
|
|
|
|
# Base 64 string
|
2016-04-20 21:35:06 +00:00
|
|
|
s:[\\+/a-z0-9=]{50,}:BASE64:ig;
|
2015-04-04 14:37:32 +00:00
|
|
|
# --workdir ...
|
|
|
|
s:parallel/tmp/aspire-\d+-1:TMPWORKDIR:g;
|
|
|
|
# + cat ... | (Bash outputs these in random order)
|
|
|
|
s/\+ cat.*\n//;
|
|
|
|
# + echo ... | (Bash outputs these in random order)
|
|
|
|
s/\+ echo.*\n//;
|
|
|
|
# + wc ... (Bash outputs these in random order)
|
|
|
|
s/\+ wc.*\n//;
|
|
|
|
# + command_X | (Bash outputs these in random order)
|
|
|
|
s/.*command_[ABC].*\n//;
|
2015-04-15 20:32:46 +00:00
|
|
|
# Due to multiple jobs "Second started" often ends up wrong
|
|
|
|
s/Second started\n//;
|
2016-01-23 08:54:05 +00:00
|
|
|
s/The second finished\n//;
|
2015-04-15 20:32:46 +00:00
|
|
|
# Due to multiple jobs "tried 2" often ends up wrong
|
|
|
|
s/tried 2\n//;
|
2015-05-25 00:27:30 +00:00
|
|
|
# Due to order is often mixed up
|
|
|
|
s/echo \d; exit \d\n/echo X; exit X\n/;
|
2015-10-18 09:44:02 +00:00
|
|
|
# Race condition causes outdir to sometime exist
|
2016-04-14 06:33:58 +00:00
|
|
|
s/(std(out|err)|seq): Permission denied/$1: No such file or directory/;
|
2015-04-04 14:37:32 +00:00
|
|
|
'
|
2015-04-09 23:20:51 +00:00
|
|
|
# 3+3 .par files (from --files), 1 .tms-file from tmux attach
|
2015-04-22 22:15:23 +00:00
|
|
|
find {$TMPDIR,/var/tmp,/tmp}/{fif,tms,par[^a]}* -mmin -10 2>/dev/null | wc -l
|
|
|
|
find {$TMPDIR,/var/tmp,/tmp}/{fif,tms,par[^a]}* -mmin -10 2>/dev/null | parallel rm
|