Progress Bar
Does anyone know how i can give the effect of a progress bar in a Linux Script while running a process?
Thanks! |
Here are two hacks at what you are looking for:
The first will call the process (in my test case a sleep) and print # marks every second until the process ends. This bar really only gives the user a hint that something is still working. He/she has no clue how long it will take. Code:
#!/bin/sh Code:
#!/bin/sh |
Well, that was a cool one crabboy. I am very much impressed by this one.
|
Another way to do it is spawn a process that loops and updates the display based on the contents of a file and then dies when the file contains certain text eg "STOP". The actual program that is doing the work can then echo the makers eg #s to the file at strategic points in the process.
|
All times are GMT -5. The time now is 07:07 PM. |