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]
There's no way to pad with anything but spaces using printf. You can use sed:
printf
sed
printf "%-50s@%s\n" $PROC_NAME [UP] | sed -e 's/ /-/g' -e 's/@/ /' -e 's/-/ /'