Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'use a shell script...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
use a shell script...
Authored by: smark on Oct 17, '01 10:31:53AM
To use bbopen (actually I prefer simply bb) with sudo, just add the following script (with whatever name you choose) to /usr/local/bin (or similar) :
#!/bin/sh
if [ -z "$1" ]; then	
	echo usage: bbopen file1 file2 ...	
	exit
fi
open -a "/Applications/BBEdit [Lite] 6.1/BBEdit [Lite] 6.1 for OS X" $*
Then a simple
chmod u+x bbopen 
and you're set (although BBEdit obviously can't be running yet to launch as root, which can be a pain)
Note: if you leave out the if ... fi, you can use the command
sudo bbopen
to just launch BBEdit as root

[ Reply to This | # ]