Can I make a CoffeeScript executable just like a Perl or shell script?
Something like adding
#!coffee
on top? (I tried this, and all I get is a "bad interpreter")
I'm on OS X if that matters.
You can use:
#!/usr/bin/env coffee console.log 'hello coffeescript!'
Just make sure you also make the executable:
chmod +x myfile.coffee
Then you can run it with:
myfile.coffee
Have you tried the absolute path? A “bad interpreter" usually means that there is a fraudulent new line at the end, for example. you need to run dos2unix on it.
dos2unix
You need an absolute path (at least on Linux, OSX may be different)
or you can cheat using env
env
#!/usr/bin/env coffee # **Your script here**
Looks like you already made sure you created the script executable if you get this error
Source: https://habr.com/ru/post/894783/More articles:to remove ipython mac os x - ipythonCreate a variable and execute the code inside the Sandbox - javascriptHow to TAB through ListView with TextBoxes as TreeViewItems? - listviewUsing AQGridView for different screen sub-layouts - objective-cAdding PyDev to Eclipse using PyDev zip - pythonhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/894784/finding-center-of-a-set-of-points-to-sort-them-clockwise&usg=ALkJrhghoA-uuJRF6kj-q02ZEMiMURTbAwAndroid registerOnSharedPreferenceChangeListener () causes crash in user view - androidC # .NET VS2010 Limit Points Not Working - c #Unittest setUpClass not working - pythonFacebook Graph API returns false, although posting is public - facebookAll Articles