I posted this message but could see it myself. Maybe the moderator can fix why I can't see it. Thanks [This is your moderator speaking You had a space in the first URL in this post. I removed it and now the post shows as it should. The forum has a quirk where it will just show a blank post if it doesn't like a URL that's in the post. Check for spaces, carriage returns, line feeds, any characters not allowed in a URL.]
Good to know - thanks Mod
Anyway, It seems a couple of us noobs want to try writing some script. I understand scripts can be complicated so I hope you won't think we're too presumptuous. Well, maybe we are!!! Hopefully our projects aren't too lengthy so we can sort of muddle through with a bit of help.
We started out trying to automount/ auto unmount as described here. http://www.murga-linux.com/puppy/viewto ... 338#631338 But in the interests of others who may want to try some script writing, I thought it would be worthwhile to start a general thread on the subject. Here are some thoughts collected thus far which hopefully others can add so it becomes a useful reference thread. Thanks in advance.
---------------------
So far I've found Puppy uses two scripts, one called Bash and another more basic script called sh. For instance, Drive_all is a script that controls automounting and is written in sh. RXVT terminal seems to be based on bash script so you can test stuff by opening a terminal in the directory of interest.
Here is some background info on sh
Bash seems like an easier script to understand than sh and includes things like a copy command which sh does not.Each script starts with a "shebang" and the path to the shell that you want the script to use, like so:#!/bin/bash
The "#!" combo is called a shebang by most Unix geeks. This is used by the shell to decide which interpreter to run the rest of the script, and ignored by the shell that actually runs the script. Confused? Scripts can be written for all kinds of interpreters — bash, tsch, zsh, or other shells, or for Perl, Python, and so on. You could even omit that line if you wanted to run the script by sourcing it at the shell, but let's save ourselves some trouble and add it to allow scripts to be run non-interactively.
The Bourne shell (sh), was the default Unix shell of Unix Version 7. Most Unix-like systems continue to have /bin/sh—
General thoughts for noobs:
. be careful in mods to basic puppy files as you may screw something up. If this happens, shutdown without saving or just use a ram only Puppy for experiments.
. there may be more than one termination point in the file you are trying to modify. I tried to tack on some bash commands at the end of an sh file without any response so maybe the next step is to try calling a new script file based on bash. Not sure how to do that but will edit later.
Here is a general / comprehensive Bash manual although I don't think the commands are the same as sh but we might find some clues.
http://sourceforge.net/projects/linuxco ... f/download
This looks to be an 'official' reference manual for sh.
http://heirloom.sourceforge.net/sh/sh.1.html
This link explains when / why to use sh vs Bash
http://bsdwiki.reedmedia.net/wiki/Creat ... cript.html
EDIT: Instead of using 'reply' I'll just thank everyone for their suggestions /encouragement in the following posts here - thus i'll save the reply for when I have a specific question/problem as suggested. I think before I get to the 'waterstarting' stage as noted below, I'll just be doing some standard 'uphaul starts'. Which will make sense to those who enjoy my fav sport, windsurfing! Cheers.