I'm trying to run a script from URL as root with this command:
sudo bash <(curl -s http://copy.com/gLVZIqUubzcS/popcorn)
But I'm getting this error:
bash: /dev/fd/63: Aucun fichier ou dossier de ce type
French for "not found". Any ideas what it might be?
P.S: I'm running Ubuntu 12.04
Best Answer
Don't use process substitution like that. In practice, it's pretty much just this anyway:
Or:
Unless the script you're trying to run makes use of
bashisms
the above will work. If it does usebash
-only syntax you should do:Though the above doesn't seem to work, which I expect is due to
sudo
not liking the shell's built-in.dot.
So do this:
You could also simply do:
You don't need to invoke the
bash
executable again when you can use the shell's built-ins instead.