I have a script that goes through many different checks and I use the success, failure functions defined in /etc/init.d/functions to clearly show the action result on the terminal.That works great, except in some cases where I print a bit more text, I then get the result box displayed over my text:/usr/share/app/lib/lib_mylib.so     lib[  OK  ]o matches as expectedWhere I'd like it to be displayed:/usr/share/app/lib/lib_mylib.so     lib_mylib.so matches as expected      [  OK  ]Looking around I saw that /etc/init.d/functions is using a variable RES_COL to position where to print the result field. If /etc/sysconfig/init exists then RES_COL is taken from there, set by default to 60 chars. I've tried export RES_COL=100 after sourcing /etc/init.d/functions to no avail.Furthermore I'd like the result field to be right-aligned with the terminal window and not having to hard-code any value for that. Any idea?
Display result of a command right aligned in terminal
bash;shell;terminal