mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-29 17:37:55 +00:00
25 lines
642 B
Bash
Executable file
25 lines
642 B
Bash
Executable file
#!/bin/bash
|
|
|
|
PAR=parallel
|
|
|
|
# Test -I
|
|
seq 1 10 | $PAR -k 'seq 1 {} | '$PAR' -k -I :: echo {} ::'
|
|
|
|
seq 1 10 | $PAR -k 'seq 1 {} | '$PAR' -X -k -I :: echo a{} b::'
|
|
|
|
seq 1 10 | $PAR -k 'seq 1 {} | '$PAR' -m -k -I :: echo a{} b::'
|
|
|
|
seq 1 60000 | $PAR -I :: -m echo a::b::c | \
|
|
mop -q "|sort |md5sum" :par
|
|
CHAR=$(cat ~/.mop/:par | wc -c)
|
|
LINES=$(cat ~/.mop/:par | wc -l)
|
|
echo -n "Chars per line ($CHAR/$LINES): "
|
|
echo "$CHAR/$LINES" | bc
|
|
|
|
seq 1 60000 | $PAR -I :: -X echo a::b::c | \
|
|
mop -q "|sort |md5sum" :par
|
|
CHAR=$(cat ~/.mop/:par | wc -c)
|
|
LINES=$(cat ~/.mop/:par | wc -l)
|
|
echo -n "Chars per line ($CHAR/$LINES): "
|
|
echo "$CHAR/$LINES" | bc
|