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:
#!/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!
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!!!!
What does the (! "...") line do?
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")
See here:
http://www.newlisp.org/newlisp_manual.html#shell
and also here:
http://www.newlisp.org/newlisp_manual.html#exec