January 24, 2007

BASH socket IO

BASH 可以藉由存取
/dev/tcp/host/port
/dev/udp/host/port
來作簡單的 socket IO
看實例:
bashget.sh 使用 /dev/tcp/host/80 抓 http:// 檔案, 類似 wget 簡易版
bashmail.sh 使用 /dev/tcp/host/25 發 mail
ref.
Unixjunkie Blog: Two Cool Bash Tricks
Bash tricks | bhaskarvk.info

Posted by pank at January 24, 2007 05:35 PM
Comments
Post a comment













Remember personal info?