I am writing a bash shell script to display if a process is running or not.
So far, I got this:
printf \"%-50s %s\\n\" $PROC_NAME [UP]
Here's another one:
$ { echo JBoss DOWN; echo GlassFish UP; } | while read PROC STATUS; do echo -n "$PROC "; printf "%$((48-${#PROC}))s " | tr ' ' -; echo " [$STATUS]"; done JBoss -------------------------------------------- [DOWN] GlassFish ---------------------------------------- [UP]