Active Topics

 


Reply
Thread Tools
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.
 
linux_author's Avatar
Posts: 282 | Thanked: 69 times | Joined on Dec 2007 @ Penniless Park, Fla.
#12
Originally Posted by missaghi View Post
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.
- great!

- 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)
 
Posts: 57 | Thanked: 0 times | Joined on Dec 2007
#13
[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?
 
Posts: 678 | Thanked: 197 times | Joined on Jul 2007 @ San Jose CA
#14
Originally Posted by HWL View Post
How do I launch it from the folder location or do I need to have the desktop applet/icon running?
[in a xterm window]
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"
 

The Following User Says Thank You to nhanquy For This Useful Post:
Posts: 57 | Thanked: 0 times | Joined on Dec 2007
#15
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?

Last edited by HWL; 2008-01-28 at 03:24. Reason: addition
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#16
Originally Posted by HWL View Post
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....
There's 3 scripts posted here: linuxauthor's, mine, and missaghi's. Any of them will work the same; there's some difference of functionality with multiple interfaces, and differences in the exact speech (a matter of taste). Oddly enough, I prefer mine ; choose whichever you like best... and feel free to tweak it to suit you.

Also, whats the N800's equivalent editor to Vi for Xterm?
vi

I use JOE, some people like pico; both of these are packaged and available from repos, but vi is preinstalled.
 
Posts: 57 | Thanked: 0 times | Joined on Dec 2007
#17
thanks...
I loaded emelFM2 and have been reading up on awk.
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:00.