Reputation: 2210
I am newbie in lisp I have installed Clisp in my ubuntu 14.04 machine and SBCL too.
My Program in TextEditor looks like this:
( hello world )
but i am getting the following error:
user@user:~/Desktop/lisp$ ./test.lisp
./test.lisp: line 1: i: command not found
Upvotes: 0
Views: 5478
Reputation: 48745
With CLISP under a unix (like Ubuntu) you can simply add a shebang to the top of your file #!/path/to/clisp
and in Ubuntu that would be #!/usr/bin/clisp
and it will execute the code as a script.
You need the file to contain proper Common Lisp file like:
#!/usr/bin/clisp
(princ "Hello, world!")
And make the file executable with chmod 755 <filename>
. Unless you have placed it in one of the directories in $PATH
you'll need to enter the path to it. From the directory of the file simply ./<filename>
would suffice.
Upvotes: 2