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