Skip to content

Commit 6ed0a9a

Browse files
committed
update threads.sh skip comment line with(#).
1 parent bf46bd8 commit 6ed0a9a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bashrc/threads.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,18 @@ INDEX=0
149149
while read -r HOST
150150
do
151151
(( INDEX++ ))
152+
fchar=`echo ${HOST} | cut -c -1`
153+
152154
if [ "x${HOST}" == "x" ]; then
153-
_print_fatal "[$INDEX] null string for hostname."
155+
_print_fatal "Notice: null string for hostname."
156+
continue
157+
elif [ "x$fchar" = "x#" ]; then
158+
host=`echo $HOST | cut -c 2-`
159+
_print_fatal "[$INDEX] Warn: skip ${host}"
160+
unset host
154161
continue
155162
fi
163+
unset fchar
156164

157165
_trace "[$INDEX] start ${HOST} ......"
158166
read <&9

0 commit comments

Comments
 (0)