Skip to content

Commit f8ff242

Browse files
committed
use printf instead of print in awk script
1 parent c4fcf7e commit f8ff242

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

show-busy-java-threads

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ findBusyJavaThreadsByTop() {
332332
# output field: pid, threadId, pcpu, user
333333
local output_fields="$( echo "$ps_out" |
334334
awk -v "threadId=$threadId" -v "pcpu=$pcpu" '$2==threadId {
335-
print $1 " " threadId " " pcpu " " $3; exit
335+
printf "%s %s %s %s\n", $1, threadId, pcpu, $3; exit
336336
}' )"
337337
if [ -n "$output_fields" ]; then
338338
(( idx++ ))

0 commit comments

Comments
 (0)