I'll echo Anthony's comments - it makes a lot more sense to download the script and execute it directly, but if you're really set on using the -c option for bash, it's a little bit complicated, the problem is that when you do:

something | xargs -0 bash -c

there's no opportunity to pass any arguments. They all get swallowed as the argument to -c - it essentially gets turned into:

bash -c "$(something)"

so if you place something after the -c in the xargs, it gets before the something. There is no opportunity to put anything after something, as xargs doesn't let you.

If you want to pass arguments, you have to use the substitution position option for xargs, which allows you to place where the argument goes, The option is -J <item> , and the next thing to realize is that the first argument will be $0 , so you have to do:

something | xargs -0 -I @ bash -c @ something <arg1> <arg2>…

I can emulate this with:

echo 'echo hi: ~$0~ ~$1~ ~$2~ ~$3~' | xargs -0 -I @ bash -c @ something one two three four

which yields: