Skip to content

Commit 2c70022

Browse files
committed
fix wrong condition
1 parent 2d614f5 commit 2c70022

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

show-busy-java-threads.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ bluePrint() {
115115
normalPrint() {
116116
echo "$@"
117117

118-
[ -z "$append_file" ] && echo "$@" >> "$append_file"
118+
[ -n "$append_file" ] && echo "$@" >> "$append_file"
119119
}
120120

121121
if [ -n "$jstack_path" ]; then
@@ -193,7 +193,7 @@ head_info() {
193193
echo
194194
}
195195

196-
for((i = 0; i < repeat_times; ++i)); do
196+
for ((i = 0; i < repeat_times; ++i)); do
197197
[ "$i" -gt 0 ] && sleep "$interval"
198198

199199
[ -n "$append_file" ] && head_info >> "$append_file"

0 commit comments

Comments
 (0)