Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ScKaSx

macrumors regular
Original poster
Feb 27, 2006
105
0
I was trying to run this simple apple script:

#!/bin/sh
# Script RunVi.command
osascript <<EOF
tell app "Terminal"
set number of rows of first window to 34
set number of columns of first window to 96
set custom title of first window to "VI Editor"
end tell
EOF
vi $@

However, when I try running this in the terminal or by double-clicking in the folder it reads the following error:

"The .command file ‘*.command’ could not open. Most likely it is not executable."

Anyone know what is going on, it doesn't make sense to me. Right now the path for the script is in: Home/Lib*/Application Support/Terminal/

Thanks,
ScKaSx
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
You need to change the .command file's permissions. Run:
Code:
chmod u+x myfile.command
 

ScKaSx

macrumors regular
Original poster
Feb 27, 2006
105
0
Thanks!

Hi Kainjow,

Thanks that works! Arg, its always the permissions that get me.

Cheers,
ScKaSx
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.