Printf left align and right align to obtain a fixed length string without truncation by varying space separators
Advertisements I would like to obtain the following output from Bash printf using three variables (code, parameter, value): [OK] Percentage: 100% [OK] Ping time: 31ms [OK] Memory usage: 7MB [KO] Main Drive Temperature: 104°C [OK] Uptime: 4d 22h 32m Space between parameter 1 and 2 is one space since 1 is always four characters long,… Read More Printf left align and right align to obtain a fixed length string without truncation by varying space separators