[SLUG] You can find more information by searching on these sessions in the JavaOne conference sessions page.

2007-12-17 Thread Floy Couch
Other Enhancements Under Consideration Some of the other things under consideration by the Expert Group include the following: Access to the unfetched state of detached entities. Solaris has a different kernel and a different implementation of the system libraries, but it implements most of

[SLUG] Final Reminder: Open Source Software Adoption:Anatomy of Success and Failure

2007-12-17 Thread Mark Phillips
Final reminder for the IEEE Computer Societies seminar on Wednesday 19th December, tomorrow at the Australian Technology Park. Professor Brian Fitzgerald on Open Source Software Adoption: Anatomy of Success and Failure RSVP: Friday December 14th 2007 to [EMAIL PROTECTED] or (02) 6267 6276

[SLUG] USB to serial

2007-12-17 Thread Alan L Tyree
Is there anything that I need to look for in these USB to serial converters? Any special software needed? Thanks, Alan -- Alan L Tyreehttp://www2.austlii.edu.au/~alan Tel: 04 2748 6206 Fax: +61 2 4782 7092 FWD: 615662 -- SLUG - Sydney Linux User's Group

Re: [SLUG] USB to serial

2007-12-17 Thread DaZZa
On Dec 18, 2007 12:59 PM, Alan L Tyree [EMAIL PROTECTED] wrote: Is there anything that I need to look for in these USB to serial converters? Any special software needed? Be careful which one you buy. Some of the cheaper ones simply don't work. I have one from Lindy, and it's never let me down.

Re: [SLUG] USB to serial

2007-12-17 Thread Martin Barry
$quoted_author = DaZZa ; On Dec 18, 2007 12:59 PM, Alan L Tyree [EMAIL PROTECTED] wrote: Is there anything that I need to look for in these USB to serial converters? Any special software needed? Be careful which one you buy. Some of the cheaper ones simply don't work. I have one from

Re: [SLUG] USB to serial

2007-12-17 Thread Simon Wong
I would recommend the Keyspan USA-19HS. On Tue, 2007-12-18 at 13:33 +1100, Martin Barry wrote: $quoted_author = DaZZa ; On Dec 18, 2007 12:59 PM, Alan L Tyree [EMAIL PROTECTED] wrote: Is there anything that I need to look for in these USB to serial converters? Any special software

Re: [SLUG] USB to serial

2007-12-17 Thread Dean Hamstead
i bought one from dick smiths (whilst in new zealand), just happened to be on special so i thought it might come in handy. it really has! the linux kernel has a stable driver that picks it up automagically in debian. windows XP doesnt know what it is until you install a driver then it works

[SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Jeff Waugh
Hi all, Here's a starting point. What's a more optimal way to perform this task? :-) sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m Tuesday afternoon shell optimisation party! Thanks, - Jeff -- linux.conf.au 2008: Melbourne, Australiahttp://lca2008.linux.org.au/ It will

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Martin Barry
$quoted_author = Jeff Waugh ; Here's a starting point. What's a more optimal way to perform this task? :-) the first question was what is the task trying to achieve? :) sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m you appear to be counting the number of fields in a csv file but

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Jeff Waugh
quote who=Martin Barry $quoted_author = Jeff Waugh ; Here's a starting point. What's a more optimal way to perform this task? :-) the first question was what is the task trying to achieve? :) That's part of the challenge. sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m you

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Martin Visser
perl -e 'while(){$a+=s/[,]//g};print $a\n' input.txt Do I win?? On Dec 18, 2007 4:09 PM, Jeff Waugh [EMAIL PROTECTED] wrote: Hi all, Here's a starting point. What's a more optimal way to perform this task? :-) sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m Tuesday afternoon shell

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Scott Ragen
[EMAIL PROTECTED] wrote on 18/12/2007 04:09:15 PM: Hi all, Here's a starting point. What's a more optimal way to perform this task? :-) sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m Not the most graceful, but the following seems to work: grep -o ',' input.txt |wc -l

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Robert Thorsby
On 18/12/07 16:32:03, Jeff Waugh wrote: That's part of the challenge. sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m Something like the following might be close: awk 'BEGIN{FS=,}{$0~,$:i=i+NF?i=i+NF-1}END{print(i)}' input.txt Robert Thorsby Old timers will tell you what a pain unstable

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Lindsay Holmwood
On Dec 18, 2007 4:35 PM, Martin Visser [EMAIL PROTECTED] wrote: perl -e 'while(){$a+=s/[,]//g};print $a\n' input.txt Do I win?? No. Ironically, your solution is 3 characters longer. :-) Lindsay -- http://slug.org.au/ (the Sydney Linux Users Group) http://holmwood.id.au/~lindsay/ (me) --

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Jeff Waugh
quote who=Martin Visser perl -e 'while(){$a+=s/[,]//g};print $a\n' input.txt Do I win?? Oddly, perl very rarely wins these. ;-) - Jeff -- linux.conf.au 2008: Melbourne, Australiahttp://lca2008.linux.org.au/ Odd is good by the way. I knew normal in high school and normal

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread James Gray
On 18/12/2007, at 4:42 PM, Scott Ragen wrote: [EMAIL PROTECTED] wrote on 18/12/2007 04:09:15 PM: Hi all, Here's a starting point. What's a more optimal way to perform this task? :-) sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m Not the most graceful, but the following seems to

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Jeff Waugh
quote who=Scott Ragen grep -o ',' input.txt |wc -l Oh nice, grep -o! Clever! :-) - Jeff -- GNOME.conf.au 2008: Melbourne, Australia http://live.gnome.org/Melbourne2008 People keep asking me why we aren't married, and he says, 'Every time I am about to ask you, you do

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Jeff Waugh
quote who=Robert Thorsby sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m Something like the following might be close: awk 'BEGIN{FS=,}{$0~,$:i=i+NF?i=i+NF-1}END{print(i)}' input.txt Close in what sense, the syntax error, the length, or the output? ;-) - Jeff -- GNOME.conf.au 2008:

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Robert Thorsby
On 18/12/07 16:45:18, Robert Thorsby wrote: Something like the following might be close: awk 'BEGIN{FS=,}{$0~,$:i=i+NF?i=i+NF-1}END{print(i)}' input.txt Oops, I transposed the : and the ? in the conditional. Just shows what you can do when fingers outpace brain. Robert Thorsby Research is

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Jeff Waugh
quote who=James Gray Not the most graceful, but the following seems to work: grep -o ',' input.txt |wc -l Assuming we're using GNU grep we can leave the pipe off: grep -c -o ',' input.txt Hmm, unfortunately the -c misinterprets the count due to a weird interaction between -c and

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Lindsay Holmwood
On Dec 18, 2007 4:53 PM, Jeff Waugh [EMAIL PROTECTED] wrote: quote who=James Gray Not the most graceful, but the following seems to work: grep -o ',' input.txt |wc -l Assuming we're using GNU grep we can leave the pipe off: grep -c -o ',' input.txt Hmm, unfortunately the

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Robert Thorsby
On 18/12/07 16:50:17, Jeff Waugh wrote: Something like the following might be close: awk 'BEGIN{FS=,}{$0~,$:i=i+NF?i=i+NF-1}END{print(i)}' input.txt Close in what sense, the syntax error, the length, or the output? ;-) - Jeff Syntax error granted -- just keeping you on your toes :-)

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Jeff Waugh
quote who=Lindsay Holmwood Not a bug at all! grep -c only counts the number of matching lines, not the number of occurances of a pattern in a line. But when you stick -o in there... Hrrrmmm... I even switched their position on the command line to see if that changed the output. Total cargo

RE: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Roger Barnes
Here's a starting point. What's a more optimal way to perform this task? :-) sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m For starters, remount the partition containing input.txt with the noatime option and disable trackerd. :) Then, change the '*' to a '\+' in your regex. This saved

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Peter Hardy
On Tue, 2007-12-18 at 16:09 +1100, Jeff Waugh wrote: Here's a starting point. What's a more optimal way to perform this task? :-) sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m Tuesday afternoon shell optimisation party! How do you want it optimised? grep -o is the most readable. But

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Lindsay Holmwood
On Dec 18, 2007 4:35 PM, Martin Visser [EMAIL PROTECTED] wrote: perl -e 'while(){$a+=s/[,]//g};print $a\n' input.txt Ruby version: ruby -e p IO.read('input.txt').count(',') Lindsay -- http://slug.org.au/ (the Sydney Linux Users Group) http://holmwood.id.au/~lindsay/ (me) -- SLUG - Sydney

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Scott Ragen
[EMAIL PROTECTED] wrote on 18/12/2007 05:21:35 PM: On Tue, 2007-12-18 at 16:09 +1100, Jeff Waugh wrote: Here's a starting point. What's a more optimal way to perform thistask? :-) sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m Tuesday afternoon shell optimisation party! How do

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Peter Hardy
On Tue, 2007-12-18 at 17:05 +1100, Lindsay Holmwood wrote: On Dec 18, 2007 4:35 PM, Martin Visser [EMAIL PROTECTED] wrote: perl -e 'while(){$a+=s/[,]//g};print $a\n' input.txt Ruby version: I've got a sixpack of beer for a working PostScript variant. :-) -- Pete -- SLUG - Sydney

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Jeff Waugh
quote who=Peter Hardy How do you want it optimised? It doesn't matter either way -- almost all claims in these threads are educational in some form or another! :-) - Jeff -- GNOME.conf.au 2008: Melbourne, Australia http://live.gnome.org/Melbourne2008 Blessed are the cracked, for they

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Robert Thorsby
On 18/12/07 17:33:25, Scott Ragen wrote: This seems to work too: cat input.txt |tr -dC ',' |wc -c Use redirection to eliminate cat tr -dC ',' input.txt | wc -c Robert Thorsby Let me know if you don't receive this message. -- email signature tagline -- SLUG - Sydney Linux

Re: [SLUG] Tuesday afternoon shell command optimisation party!

2007-12-17 Thread Peter Chubb
tr -dc ',' input.txt | wc -c will count the number of commas in the input file. Peter C -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html