From 397b631924d2d16bb69f106485c63578dc0e202a Mon Sep 17 00:00:00 2001 From: Fabian Sylvester Date: Thu, 18 Apr 2024 13:40:19 +0000 Subject: [PATCH] Remove unnecessary use of awk (#422) --- segments/cpu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/segments/cpu.sh b/segments/cpu.sh index 8c3b923a..1c70d2c0 100755 --- a/segments/cpu.sh +++ b/segments/cpu.sh @@ -15,7 +15,7 @@ run_segment() { fi if [ -n "$cpu_user" ] && [ -n "$cpu_system" ] && [ -n "$cpu_idle" ]; then - echo "${cpu_user}, ${cpu_system}, ${cpu_idle}" | awk -F', ' '{printf("%5.1f,%5.1f,%5.1f",$1,$2,$3)}' + printf "%5.1f, %5.1f, %5.1f" "${cpu_user}" "${cpu_system}" "${cpu_idle}" return 0 else return 1