Zie hieronder een voorbeeld script om aan het einde van de regel helemaal rechts uitgelijnd een SUCCES melding in het groen of een FAILED melding in het rood te krijgen.
#!/bin/bash # Set the message success_message="Your command was successful" failed_message="Your command failed" # Set the "OK" string in green ok="$(tput setaf 2)[SUCCES]$(tput sgr0)" failed="$(tput setaf 1)[FAILED]$(tput sgr0)" # Get the width of the terminal term_width=$(tput...
ing. M.A.C.M. (Martijn) van den BoomComputer Infrastructure Engineeringenieur, docent en mentor
