Wednesday, May 28, 2008
Slowly Educating Myself (Learning Bash, part 1)
Last night I decided that I would finally "teach" myself bash. That may sound kind-of odd, as most know that by default, most Linux distros use bash at the command line, and more than likely, I understood a decent bit about it already. This may be true, but I need to learn syntax for things like for loops, if loops, basic commands, etc.

A few helpful sites that I'm using right now:

The Linux Document Project's tutorial for Bash Scripting. TLDP taught me about Logical Volume Management, so this was the first place I looked for a basic introduction to Bash. It's not quite as in-depth as I was hoping, but that's OK; I still learned some valuable info related to syntax and HOW to write code in bash. Good stuff.

hypexr's documentation is also very informative. I learned about two different "modes" for bash: emacs and vi. This info will DEFINITELY come in handy. I feel a inclined to install emacs so I can have a useful text editor for editing scripts. Sorry vi guys, I'm not up to your standards yet. EDIT: On second thought, maybe I will use vim afterall.

Now what I really need is to think up some reasons to write scripts. I already have some basic ideas, one of which is for backing up my home directory:

Weekly (or so) backups of my home directory in /var/. I'll need to exclude the .wine folder, as this hosts a fair amount of space that really doesn't need to be taken up in a backup. I can also exclude .Virtualbox for the same reason. If there are more than 2 backups in my /var/backups folder after a backup, I'll remove the oldest one.

We'll see how it all goes.

Labels: , , ,

Links to this post:
Create a Link