How to make a shell command with newLisp

Q&A's, tips, howto's
Locked
ale870
Posts: 297
Joined: Mon Nov 26, 2007 8:01 pm
Location: Italy

How to make a shell command with newLisp

Post by ale870 »

Hello,

I need to make a small script to map my samba drives. I wanted to make it using newLisp instead using typical shell commands (like #!/bin/bash).

I tried this, but I cannot make it executable:

Code: Select all

#!/usr/bin/newlisp

(writeln "Drive MyWindowsC...")
(! "mount MOUNT_SMB/MyWindowsC")

Please consider that the MOUNT command works perfectly.
I have Linux Mint 6 and XFCE. I (try) to execute the command as:

sudo ./mount_drives

I obtain:

ERR: invalid function : (writeln "Drive MyWindowsC...")

It seems it does not recognize newlisp as my shell interpreter.

Can you help me?

Thank you!
--

ale870
Posts: 297
Joined: Mon Nov 26, 2007 8:01 pm
Location: Italy

Post by ale870 »

OH MY GOD! I made a mistake (too many programming languages in my head!)

(writeln) does not exist! It is (println)!!!!!!!!!!!!!!!!!

I'm sorry.

Topic solved!!!!
--

TedWalther
Posts: 608
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC
Contact:

Post by TedWalther »

What does the (! "...") line do?

ale870
Posts: 297
Joined: Mon Nov 26, 2007 8:01 pm
Location: Italy

Post by ale870 »

It executes an external command, like "ls" or recall a program like a text editor.
Try this in your command shell:

WINDOWS:

>> (! "dir")

LINUX

>> (! "ls")
--

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »


Locked