2010-08-28 00:46:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-03-22 20:16:35 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
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
|
|
|
|
|
2012-06-07 23:07:25 +00:00
|
|
|
echo '### Test of #! with 2 files as input (2 columns)'
|
2012-06-08 21:45:06 +00:00
|
|
|
cat >'/tmp/she <bang>"' <<EOF
|
2012-01-08 18:52:00 +00:00
|
|
|
#!/usr/local/bin/parallel --shebang -rk --xapply -a /tmp/123 echo
|
2010-08-28 00:46:44 +00:00
|
|
|
A
|
|
|
|
B
|
|
|
|
C
|
|
|
|
EOF
|
2012-06-08 21:45:06 +00:00
|
|
|
chmod 755 '/tmp/she <bang>"'
|
2010-08-28 00:46:44 +00:00
|
|
|
seq 1 3 >/tmp/123
|
2012-06-08 21:45:06 +00:00
|
|
|
'/tmp/she <bang>"'
|