I've a script that gives the output of status of the many process (on or off). How to align the process name and status in perfect columns..
RED=tput setaf 1
GREEN=tput setaf 2
COL=40
...
...
if /opt/rad/beh.sh status | grep "pid"
then
printf "$i" "$GREEN" $COL "[UP]" "$NORMAL"
else
printf $i
"$GREEN" $COL "[UP]" "$NORMAL"
fi
here, 'i' represents the process name that is in the machine.. didn't write the full code here. just need the alignment part corrected. Could someone please help me with this ?