![]() |
Re: a simple talking IP address utility for flite
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. |
Re: a simple talking IP address utility for flite
Quote:
- and that's the point, isn't it? 'Have a lot of fun!' :-) (it's nice to be able to easily craft customized software tools) |
Re: a simple talking IP address utility for flite
[QUOTE=linux_author;131986- note that the script is stored under /home/user/apps as IPTalk.sh[/QUOTE]
a little guidance please... so I got the now renamed IPTalk.sh onto the internal memory card. Then Xtermed over to /media/mmc2 and copied the file to the (su) /home/user/apps directory where I can see it. How do I launch it from the folder location or do I need to have the desktop applet/icon running? |
Re: a simple talking IP address utility for flite
Quote:
chmod +x /home/user/apps/IPTalk.sh sh /home/user/apps/IPTalk.sh if you have osso-statusbar-cpu installed then you can set a new command with "sh /home/user/appsIPTalk.sh" |
Re: a simple talking IP address utility for flite
whats the difference between the original script and this one below in terms of getting this one operating? Are they interchangeable or do I need to modify something....
Thanks /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 Also, whats the N800's equivalent editor to Vi for Xterm? |
Re: a simple talking IP address utility for flite
Quote:
Quote:
I use JOE, some people like pico; both of these are packaged and available from repos, but vi is preinstalled. |
thanks...
I loaded emelFM2 and have been reading up on awk. |
| All times are GMT. The time now is 14:49. |
vBulletin® Version 3.8.8