I love the command line tools that BBEdit ships with. They let you open and create files in BBEdit all from the terminal. For example, typing bbedit -c foo.cppin the terminal will create and open a file called foo.cpp in BBEdit. Using perl and the "open" command in OSX, you can easily create this functionality for any application.
The following code works for Project Builder. I put it in a file called pb in ~/bin (make it executable and type 'rehash' to use) and it works just liked bbedit!
#!/usr/bin/perl[The last line is shown on two lines; enter it on one with no spaces.]
my $create = 0 ;
foreach (@ARGV)
{
if($_ eq "-c") {
$create = 1 ;
}
else {
$filename = $_ ;
}
}
if (! -e $filename )
{
chomp $filename ;
if($create) {
system "touch $filename"; }
else
{
print "$filename doesn't exist. Specify -c to create.n" ;
exit ;
}
}
elsif( $create == 1 )
{
print "$filename already exists. Cannot create.n" ;
exit ;
}
system "open -a /Developer/Applications
/Project\ Builder.app $filename" ;
Mac OS X Hints
http://hints.macworld.com/article.php?story=20021018070350273