myfunc() { printf " %s" "I got these arguments:" "$@" $'\n' } export -f myfunc seq 6 | xargs -n2 bash -c 'myfunc "$@"' "$0"