I have to write a bash script that makes lot of things. I'd like to print messages as nice as init scripts do. For example:
Doing A... [OK]
Doing B... [ERROR]
....
Do you know any way to make this?
Thanks in advance
On all my Linux boxes, the code to do that is in the file:
/etc/init.d/functions
If you include that file (. /etc/init.d/functions
) and then run your code doing this:
action /path/to/prog args
you will get the functionality you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With