#!/bin/bashHOST=$1PORT="22 25 80 8080"for PORT in $PORT; doif echo &>/dev/null > /dev/tcp/$HOST/$PORT; thenecho "$PORT open"elseecho "$PORT close"fidone用 shell 打印示例语句中字母数小于6的单词#示例语句:#Bash also interprets a number of multi-character options.#!/bin/bash###############################################################shell打印示例语句中字母数小于6的单词##############################################################for s in Bash also interprets a number of multi-character options.don=`echo $s|wc -c`if [ $n -lt 6 ]thenecho $sfidone