You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# NOTE: $'foo' is the escape sequence syntax of bash
50
-
readonlynl=$'\n'# new line
50
+
readonlyNL=$'\n'# new line
51
51
52
52
colorPrint() {
53
53
local color=$1
@@ -151,7 +151,7 @@ usage() {
151
151
(($#>0))&&shift
152
152
local -r out=$(((exit_code !=0) +1))
153
153
154
-
(($#>0))&& colorPrint 31 "$*$nl">&"$out"
154
+
(($#>0))&& colorPrint 31 "$*$NL">&"$out"
155
155
156
156
cat >&"$out"<<EOF
157
157
Usage: ${PROG} [OPTION]... [delay [count]]
@@ -352,18 +352,18 @@ if [ -n "$jstack_path" ]; then
352
352
elif [ -n"$JAVA_HOME" ];then
353
353
# 2. search jstack under JAVA_HOME
354
354
if [ -f"$JAVA_HOME/bin/jstack" ];then
355
-
[ -x"$JAVA_HOME/bin/jstack" ] || die "found \$JAVA_HOME/bin/jstack($JAVA_HOME/bin/jstack) is NOT executable!${nl}Use -s option set jstack path manually."
355
+
[ -x"$JAVA_HOME/bin/jstack" ] || die "found \$JAVA_HOME/bin/jstack($JAVA_HOME/bin/jstack) is NOT executable!${NL}Use -s option set jstack path manually."
356
356
jstack_path="$JAVA_HOME/bin/jstack"
357
357
elif [ -f"$JAVA_HOME/../bin/jstack" ];then
358
-
[ -x"$JAVA_HOME/../bin/jstack" ] || die "found \$JAVA_HOME/../bin/jstack($JAVA_HOME/../bin/jstack) is NOT executable!${nl}Use -s option set jstack path manually."
358
+
[ -x"$JAVA_HOME/../bin/jstack" ] || die "found \$JAVA_HOME/../bin/jstack($JAVA_HOME/../bin/jstack) is NOT executable!${NL}Use -s option set jstack path manually."
359
359
jstack_path="$JAVA_HOME/../bin/jstack"
360
360
fi
361
361
elifcommand -v jstack &>/dev/null;then
362
362
# 3. search jstack under PATH
363
363
jstack_path=$(command -v jstack)
364
-
[ -x"$jstack_path" ] || die "found $jstack_path from PATH is NOT executable!${nl}Use -s option set jstack path manually."
364
+
[ -x"$jstack_path" ] || die "found $jstack_path from PATH is NOT executable!${NL}Use -s option set jstack path manually."
365
365
else
366
-
die "jstack NOT found by JAVA_HOME(${JAVA_HOME:-not set}) setting and PATH!${nl}Use -s option set jstack path manually."
366
+
die "jstack NOT found by JAVA_HOME(${JAVA_HOME:-not set}) setting and PATH!${NL}Use -s option set jstack path manually."
0 commit comments