十个增加 Linux Shell 脚本趣味的小工具
open 631 open 下面的这个例子让你的脚本扮演HTTP客户端: #!/bin/bash exec 3<> /dev/tcp/${1:-www.cyberciti.biz}/80 printf "GET / HTTP/1.0\r\n" >&3 printf "Accept: text/html, text/plain\r\n" >&3 printf "Accept-Language: en\r\n" >&3 printf "User-Agent: nixCraft_BashScript v.%s\r\n" "${BASH_VERSION}" >&3 printf "\r\n" >&3 while read LINE <&3 do # do something on $LINE # or...阅读全文