From 50ff116b643f9dabcf6baa1fb5daedb99cbc22e8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 14 Jun 2016 17:02:14 +1000 Subject: [PATCH] Remove regex matching from disk usage --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 04a7d957..d5779f2e 100755 --- a/neofetch +++ b/neofetch @@ -1822,10 +1822,10 @@ getdisk () { disk_used="${disk_used/\.}" disk_total="${disk_total/\.}" - [[ "$disk_used" == *"T" ]] && \ + [ "${disk_used: -1}" == "T" ] && \ disk_used="$((${disk_used/T} * 100))" - [[ "$disk_total" == *"T" ]] && \ + [ "${disk_total: -1}" == "T" ] && \ disk_total="$((${disk_total/T} * 100))" fi