BASH Programming - Introduction HOW-TO
by Mike G mikkey at dynamo.com.ar
Thu Jul 27 09:36:18 ART 2000
This article intends to help you to start programming basic-intermediate shell scripts. It does not intend to be an advanced document (see the title). I am NOT an expert nor guru shell programmer. I decided to write this because I'll learn a lot and it might be useful to other people. Any feedback will be apreciated, specially in the patch form :)
1. Introduction
2. Very simple Scripts
3. All about redirection
- 3.1 Theory and quick reference
- 3.2 Sample: stdout 2 file
- 3.3 Sample: stderr 2 file
- 3.4 Sample: stdout 2 stderr
- 3.5 Sample: stderr 2 stdout
- 3.6 Sample: stderr and stdout 2 file
4. Pipes
- 4.1 What they are and why you'll want to use them
- 4.2 Sample: simple pipe with sed
- 4.3 Sample: an alternative to ls -l *.txt
5. Variables
- 5.1 Sample: Hello World! using variables
- 5.2 Sample: A very simple backup script (little bit better)
- 5.3 Local variables
6. Conditionals
- 6.1 Dry Theory
- 6.2 Sample: Basic conditional example if .. then
- 6.3 Sample: Basic conditional example if .. then ... else
- 6.4 Sample: Conditionals with variables
7. Loops for, while and until
8. Functions
9. User interfaces
10. Misc
- 10.1 Reading user input with read
- 10.2 Arithmetic evaluation
- 10.3 Finding bash
- 10.4 Getting the return value of a program
- 10.5 Capturing a commands output
- 10.6 Multiple source files
11. Tables
- 11.1 String comparison operators
- 11.2 String comparison examples
- 11.3 Arithmetic operators
- 11.4 Arithmetic relational operators
- 11.5 Useful commands
12. More Scripts
- 12.1 Applying a command to all files in a directory.
- 12.2 Sample: A very simple backup script (little bit better)
- 12.3 File re-namer
- 12.4 File renamer (simple)
13. When something goes wrong (debugging)
14. About the document
Next Previous Contents
0 comentarios:
Publicar un comentario
Suscribirse a Enviar comentarios [Atom]
<< Inicio