I'm tyring to run a Common Lisp shebang script (test.lisp) on MacOS using SBCL. The script is below:
#!/usr/local/bin/Cellar/sbcl/1.5.6/bin/sbcl --script
(write-line "test")
I ran chmod +x on the script to make it executable, and when I run it I get:
./test.lisp: line 2: write-line: command not found
I made sure my SBCL path was correct. I originally tried /usr/local/bin/sbcl, but that gave me the same error.
How can I fix this?
#!/usr/bin/env sbcl
and you probably don't need--script
(not sure - don't know anything about lisp). What happens when you run/usr/bin/local/Cellar/sbcl/1.5.6/bin/sbcl --script test.lisp
? If you get the same effect then it's not a shebang issue. - trojanfoe/usr/local/bin
mixed-up with/usr/bin/local
anyway. - trojanfoe