Output of the blocks should end in a newline or null char

This commit is contained in:
Ashish Kumar Yadav 2021-01-20 11:20:18 +05:30
parent fbdbee7f72
commit 3e97aa9be7
3 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
#!/bin/sh
ICON=" "
read -r capacity </sys/class/power_supply/BAT0/capacity
printf "$ICON%s%%" "$capacity"
printf "$ICON%s%%\n" "$capacity"

View file

@ -1,3 +1,3 @@
#!/bin/sh
ICON=" "
printf "$ICON%s" "$(date '+%a, %b %d, %R')"
printf "$ICON%s\n" "$(date '+%a, %b %d, %R')"

View file

@ -9,7 +9,7 @@ read -r temp </sys/class/thermal/thermal_zone0/temp
temp=${temp%???}
if [ "$temp" -lt "$crit" ] ; then
printf "$ICONn%s°C" "$temp"
printf "$ICONn%s°C\n" "$temp"
else
printf "$ICONc%s°C" "$temp"
printf "$ICONc%s°C\n" "$temp"
fi