2010-08-28 00:46:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo '### Test of #! with file as input'
|
|
|
|
cat >/tmp/shebang <<EOF
|
2010-09-01 13:26:45 +00:00
|
|
|
#!/usr/local/bin/parallel -Yrk echo
|
2010-08-28 00:46:44 +00:00
|
|
|
A
|
|
|
|
B
|
|
|
|
C
|
|
|
|
EOF
|
|
|
|
chmod 755 /tmp/shebang
|
|
|
|
/tmp/shebang
|
|
|
|
|
2010-09-07 23:43:11 +00:00
|
|
|
echo '### Test of #! --shebang'
|
|
|
|
cat >/tmp/shebang <<EOF
|
|
|
|
#!/usr/local/bin/parallel --shebang -rk echo
|
|
|
|
A
|
|
|
|
B
|
|
|
|
C
|
|
|
|
EOF
|
|
|
|
chmod 755 /tmp/shebang
|
|
|
|
/tmp/shebang
|
|
|
|
|
|
|
|
echo '### Test of #! --hashbang'
|
|
|
|
cat >/tmp/shebang <<EOF
|
|
|
|
#!/usr/local/bin/parallel --hashbang -rk echo
|
|
|
|
A
|
|
|
|
B
|
|
|
|
C
|
|
|
|
EOF
|
|
|
|
chmod 755 /tmp/shebang
|
|
|
|
/tmp/shebang
|
|
|
|
|
2010-08-28 00:46:44 +00:00
|
|
|
echo '### Test of #! with 2 files as input'
|
|
|
|
cat >/tmp/shebang <<EOF
|
2010-09-01 13:26:45 +00:00
|
|
|
#!/usr/local/bin/parallel -Yrk -a /tmp/123 echo
|
2010-08-28 00:46:44 +00:00
|
|
|
A
|
|
|
|
B
|
|
|
|
C
|
|
|
|
EOF
|
|
|
|
chmod 755 /tmp/shebang
|
|
|
|
seq 1 3 >/tmp/123
|
|
|
|
/tmp/shebang
|
|
|
|
|