# text file > executable



## osimp (Jan 9, 2010)

Can a text file be saved as an executable?  If so, how?


----------



## earthsaver (Jan 9, 2010)

Open Terminal. Type
	
	



```
chmod a+x
```
and drag in the saved text file. Then, remove the file's extension in its Info window in the Finder.


----------



## osimp (Jan 9, 2010)

Hmm.  Result in Terminal is 'usage: chmod [-fv] [-R [-H | -L | -P]] [-a | +a | =a  _[# [ n]]] mode|entry file ...'  My limited Terminal experience suggests that there's something wrong with the command, which was '~ osimp$ chmod a+x/Users/osimp/Desktop/CGSGetDebugOptions.rtf' (I removed the '.rtf' as instructed)._


----------



## earthsaver (Jan 9, 2010)

Two things: You need a space after a+x and you need to do this on a text file (.txt) not a rich text file. You can use TextEdit's Format > Make Plain Text command and resave.


----------



## osimp (Jan 10, 2010)

Those were indeed the issue(s).  Thanks again.


----------

