I wrote a script to show down- and up-speed of my notebook with polybar. The problem I run into is to put the output of echo in formation.
ATM my output looks like this (bash script loops in terminal) ...
WLAN0: ⬇️ 14 MiB/s ⬆️ 16 KiB/s
WLAN0: ⬇️ 60 B/s ⬆️ 0 B/s
WLAN0: ⬇️ 120 B/s ⬆️ 120 B/s
But I want it lined up, like this ...
WLAN0: ⬇️ 14 MiB/s ⬆️ 16 KiB/s
WLAN0: ⬇️ 60 B/s ⬆️ 0 B/s
WLAN0: ⬇️ 120 B/s ⬆️ 120 B/s
The essence of my code is the following simplified line ...
echo "yada: ⬇️ $string1 ⬆️ $string2"
The variables include a number and text (up to 10 chars max) each, depending on transfer speed.
So there should be at least 12 static fields between the two emoji.
But I have no clue how and I am hoping you can explain to me how to format some kind of variables width, with printf I assume.