View Single Post
Posts: 30 | Thanked: 1 time | Joined on Dec 2007 @ Minneapolis
#11
i wanted it to say "one two seven" instead of "one hundred and twenty seven" here you go:

/sbin/ifconfig |sed s/wlan/w-lan/| awk '/^[^ ]/ {interf = $1} /inet addr:/ {print interf", I P is ,:"$2}'|grep -v 127.0.0.1|cut -d: -f1,3| awk -F: '{ {a = " "} {for (i = 1; i <= length($2); i++) {a = (a (substr($2,i,1) " " )) }} {print ($1 a)} } ' |awk -F. '{print $1", dot "$2", dot "$3", dot "$4}' | flite

thanks benson for putting in the "dot" and thanks linux_author for making it in the first place. I took me an hour but it's the first time i've used awk so it was fun.