Usar o sudo no shebang parece completamente quebrado. O código a seguir:
#!/usr/bin/sudo /bin/bash
echo "this should work"
funciona bem no Ubuntu, mas no OSX me dá:
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with t...
21.12.2013 / 12:46