[Linux-disciples] Shell Scripting
Adam Rosi-Kessel
adam at rosi-kessel.org
Mon Dec 6 21:50:59 EST 2004
Are you just typing the same set of commands over and over again? Perhaps
this is too simple a question, but if so, you would just put those
commands in a file, add #!/bin/bash (or whatever your shell is) to the
top of the file, make the file executable (chmod +x filename) and you're
done--just run the file when you want to execute the commands in it.
Or maybe you want something with more logic (i.e., have it figure out
where you are and act on that)? Or do you want something that runs
automatically, e.g., at start-up, or at specific times of day?
The Advanced Bash Scripting Guide is the best free online resource I'm
aware of for learning shell scripting.
<http://www.tldp.org/LDP/abs/html/>
Don't let the "advanced" part scare you--it start out pretty basic; if
you just read the first section or two you'll probably get everything you
need.
On Mon, Dec 06, 2004 at 09:46:31PM -0500, J Smith wrote:
> I have been using rsync to transfer files back and forth from my laptop
> at home (powerbook) and my server at work. I want to automate this
> task. I am assuming that a shell script is the simplest approach.
>
> Any thoughts on:
>
> 1. Is a shell script the best solution?
> 2. Where can I get a basic-but-not-too-basic primer on writing shell
> scripts?
>
> any help is, as always, much appreciated.
>
> jason
--
Adam Rosi-Kessel
http://adam.rosi-kessel.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20041206/f376675a/attachment.pgp
More information about the Linux-disciples
mailing list