Skip to content

Commit

Permalink
Remove unnecessary use of awk
Browse files Browse the repository at this point in the history
  • Loading branch information
xx4h committed Apr 18, 2024
1 parent 62c4877 commit 6482d6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion segments/cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6482d6f

Please sign in to comment.