| Bash Shell Scripting & Progress Indicators |
| Escrito por Abner Ballardo | ||
| 01.04.2006 | ||
|
This week was the second preliminary laboratory of Operating Systems course in the PUCP. One topic I had to explain to the students was a little introduction to shell scripting. I told them about an application I made using only Bash Shell Scripting. Why did I use shell scripting? well, because that application had to take a big amount of data (more than 4GB) from two differents databases (oracle & mysql) and do a complex bussiness logic. The solution I provided was filtering the input data with some simple rules (using awk & sed) and discarded unuseful data (aprox 40%). After that, the application used some temporary tables (to do the complex logic) on mysql and got the expected result. It was unncessary to make a compiled program. BTW, we can do some interesting things with Shell Scripting. For example, a good practice is to give users a feedback that a script is not hung (progress indicator). This is specially useful with long time jobs. I will show two kinds of progress indicators: Simple Progress Indicator Print a sequence of dots.
Cool Progress Indicator Print a rotating line. #!/bin/bash |
||

