Skip to content

Commit 009f283

Browse files
authored
Added escape character
Fixes a bug on some systems
1 parent 15086bd commit 009f283

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

update-motd.d/15-system

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ label3="$(color $statsLabelColor "Uptime") $(color $bulletColor "··")$(color $
5959
label4="$(awk '{print $1}' /proc/loadavg)"
6060
label4="$(color $statsLabelColor "Load") $(color $bulletColor "···")$(color $statsLabelColor "") $(color $infoColor $label4)"
6161

62-
label5="$(df -h ~ | awk 'NR==2 { printf "%sB / %sB \e[30;38;5;144m» Free: %sB\e[0m",$3,$2,$4; }')"
62+
label5="$(df -h ~ | awk 'NR==2 { printf "%sB / %sB \\e[30;38;5;144m» Free: %sB\\e[0m",$3,$2,$4; }')"
6363
label5="$(color $statsLabelColor "Disk") $(color $bulletColor "····")$(color $statsLabelColor "") $(color $infoColor "$label5")"
6464

6565
label6="$(/bin/ls -d /proc/[0-9]* | wc -l)"
6666
label6="$(color $statsLabelColor "Procs") $(color $bulletColor "··")$(color $statsLabelColor "") $(color $infoColor $label6)"
6767

68-
label7="$(free -h --si | awk 'NR==2 { printf "%sB / %sB \e[30;38;5;144m» Free: %sB\e[0m",$3,$2,$4; }')"
68+
label7="$(free -h --si | awk 'NR==2 { printf "%sB / %sB \\e[30;38;5;144m» Free: %sB\\e[0m",$3,$2,$4; }')"
6969
label7="$(color $statsLabelColor "Memory") $(color $bulletColor "··")$(color $statsLabelColor "") $(color $infoColor "$label7")"
7070

7171
label8="$(hostname -I)"

0 commit comments

Comments
 (0)