From ryddler at cu-online.com Mon Oct 4 10:14:04 2004 From: ryddler at cu-online.com (ryddler) Date: Mon Oct 4 10:14:07 2004 Subject: [CMI.PM] Anyone heard from or seen Dan? Message-ID: <1096902844.4270.51.camel@bprice2kl.atgf.com> Our fearless leader seems to be MIA, has anyone heard from or seen him lately? -- Keep the turbo spooled! ryddler http://www.starquestclub.com From mjerryfuerst at yahoo.com Mon Oct 4 18:48:53 2004 From: mjerryfuerst at yahoo.com (Michael Fuerst) Date: Mon Oct 4 18:48:56 2004 Subject: [CMI.PM] (no subject) Message-ID: <20041004234853.14177.qmail@web41506.mail.yahoo.com> I saw him Saturday I can meet on Mondays ===== Michael Fuerst 802 N Broadway Urbana IL 61801 217 2395844 __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From mitch at ncsa.uiuc.edu Tue Oct 5 11:58:13 2004 From: mitch at ncsa.uiuc.edu (Mitch Kutzko) Date: Tue Oct 5 11:57:25 2004 Subject: [CMI.PM] CGI Event Calendar script Message-ID: <3.0.5.32.20041005115813.016ccc70@pop.ncsa.uiuc.edu> Hi, folks -- I'm trying to set up a CGI script that will read a flat text file (CSV or whatever) and generate a web-based calendar for upcoming (and previous) events. The Perl Cookbook doesn't have like that in it, and a Google search has been more confusing than helpful. Does anybody have/use something like this they like and can recommend? Thanks! Mitch -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 Project: http://dast.nlanr.net/ | Personal: http://hobbes.ncsa.uiuc.edu/ From ryddler at cu-online.com Tue Oct 5 14:48:32 2004 From: ryddler at cu-online.com (ryddler) Date: Tue Oct 5 14:48:37 2004 Subject: [CMI.PM] CGI Event Calendar script In-Reply-To: <3.0.5.32.20041005115813.016ccc70@pop.ncsa.uiuc.edu> References: <3.0.5.32.20041005115813.016ccc70@pop.ncsa.uiuc.edu> Message-ID: <1097005711.4310.45.camel@bprice2kl.atgf.com> Sorry for the resend, I thought the group should be able to chime in also. I've played around briefly with HTML::Calendar::Simple which may do what you're seeking as far as drawing the calendar, and Text::CSV does a fine job of reading CSV files into fields that you should be able to massage into the HTML::Calendar::Simple routines. On Tue, 2004-10-05 at 11:58, Mitch Kutzko wrote: > Hi, folks -- I'm trying to set up a CGI script that will read a flat text > file (CSV or whatever) and generate a web-based calendar for upcoming (and > previous) events. > > The Perl Cookbook doesn't have like that in it, and a Google search has > been more confusing than helpful. > > Does anybody have/use something like this they like and can recommend? > > Thanks! > > Mitch > -- > Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 > Project: http://dast.nlanr.net/ | Personal: http://hobbes.ncsa.uiuc.edu/ > _______________________________________________ > Champaign-Urbana mailing list > Champaign-Urbana@mail.pm.org > http://mail.pm.org/mailman/listinfo/champaign-urbana -- Keep the turbo spooled! ryddler http://www.starquestclub.com From lewart at uiuc.edu Tue Oct 5 14:53:10 2004 From: lewart at uiuc.edu (Daniel S. Lewart) Date: Tue Oct 5 14:53:12 2004 Subject: [CMI.PM] Anyone heard from or seen Dan? In-Reply-To: <1096902844.4270.51.camel@bprice2kl.atgf.com> References: <1096902844.4270.51.camel@bprice2kl.atgf.com> Message-ID: <4162FBA6.7060101@uiuc.edu> Ryddler, et al, > Our fearless leader seems to be MIA, has anyone heard from or seen him > lately? I have. :) I've just been quietly waiting for someone to suggest a date. How about Mon Oct 11 or 18 6-8pm? Cheers, Dan http://cmi.pm.org/ From ryddler at cu-online.com Tue Oct 5 15:55:11 2004 From: ryddler at cu-online.com (ryddler) Date: Tue Oct 5 15:55:16 2004 Subject: [CMI.PM] Anyone heard from or seen Dan? In-Reply-To: <4162FBA6.7060101@uiuc.edu> References: <1096902844.4270.51.camel@bprice2kl.atgf.com> <4162FBA6.7060101@uiuc.edu> Message-ID: <1097009710.4310.48.camel@bprice2kl.atgf.com> My vote is for the 18th since my birthday is the 11th, and I'll be spending that with family. (not that you guys aren't all part of my extended family, *sniff*) On Tue, 2004-10-05 at 14:53, Daniel S. Lewart wrote: > Ryddler, et al, > > > Our fearless leader seems to be MIA, has anyone heard from or seen him > > lately? > > I have. :) I've just been quietly waiting for someone to suggest a date. > > How about Mon Oct 11 or 18 6-8pm? > > Cheers, > Dan > http://cmi.pm.org/ > _______________________________________________ > Champaign-Urbana mailing list > Champaign-Urbana@mail.pm.org > http://mail.pm.org/mailman/listinfo/champaign-urbana -- Keep the turbo spooled! ryddler http://www.starquestclub.com From mitch at ncsa.uiuc.edu Tue Oct 5 23:00:37 2004 From: mitch at ncsa.uiuc.edu (Mitch Kutzko) Date: Tue Oct 5 22:59:23 2004 Subject: Next Meeting? [Was: Re: [CMI.PM] Anyone heard from or seen Dan?] In-Reply-To: <1097009710.4310.48.camel@bprice2kl.atgf.com> References: <4162FBA6.7060101@uiuc.edu> <1096902844.4270.51.camel@bprice2kl.atgf.com> <4162FBA6.7060101@uiuc.edu> Message-ID: <3.0.5.32.20041005230037.010c8ea8@pop.ncsa.uiuc.edu> 18th works for me. Where? Mitch At 03:55 PM 10/5/2004 -0500, ryddler wrote: > My vote is for the 18th since my birthday is the 11th, and I'll be > spending that with family. (not that you guys aren't all part of my > extended family, *sniff*) > > On Tue, 2004-10-05 at 14:53, Daniel S. Lewart wrote: > > Ryddler, et al, > > > > > Our fearless leader seems to be MIA, has anyone heard from or seen him > > > lately? > > > > I have. :) I've just been quietly waiting for someone to suggest a date. > > > > How about Mon Oct 11 or 18 6-8pm? > > > > Cheers, > > Dan > > http://cmi.pm.org/ > > _______________________________________________ > > Champaign-Urbana mailing list > > Champaign-Urbana@mail.pm.org > > http://mail.pm.org/mailman/listinfo/champaign-urbana > -- > Keep the turbo spooled! > ryddler > http://www.starquestclub.com > > _______________________________________________ > Champaign-Urbana mailing list > Champaign-Urbana@mail.pm.org > http://mail.pm.org/mailman/listinfo/champaign-urbana > > -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ From mjerryfuerst at yahoo.com Wed Oct 6 21:39:38 2004 From: mjerryfuerst at yahoo.com (Michael Fuerst) Date: Wed Oct 6 21:39:40 2004 Subject: [CMI.PM] Re: Champaign-Urbana Digest, Vol 12, Issue 3 In-Reply-To: <200410061700.i96H0RbF003244@www.pm.org> Message-ID: <20041007023938.46819.qmail@web50004.mail.yahoo.com> oct 18 ===== Michael Fuerst 802 N Broadway Urbana IL 61801 217 2395844 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From lewart at uiuc.edu Thu Oct 7 10:53:11 2004 From: lewart at uiuc.edu (Daniel S. Lewart) Date: Thu Oct 7 10:53:13 2004 Subject: [CMI.PM] Meeting Mon Oct 18 6-8pm @ Manzella's In-Reply-To: <1095939352.4641.10.camel@bprice2kl.atgf.com> References: <1095939352.4641.10.camel@bprice2kl.atgf.com> Message-ID: <41656667.8070508@uiuc.edu> Champaign-Urbana Perl Mongers, On Sep 23, 2004, ryddler wrote: > My schedule is much more clear now, anybody else getting the meeting > itch? mmmmmmmm, pizza bianca! I hereby announce that our next meeting shall be: * Mon Oct 18, 2004 6-8pm * Manzella's Italian Patio * 115 S First St / Champaign Benevolently, Dan http://cmi.pm.org/ From mitch at ncsa.uiuc.edu Thu Oct 7 21:02:41 2004 From: mitch at ncsa.uiuc.edu (Mitch Kutzko) Date: Thu Oct 7 21:01:28 2004 Subject: [CMI.PM] Trapping STDOUT in-process? Message-ID: <3.0.5.32.20041007210241.010c6d58@pop.ncsa.uiuc.edu> Hi, folks -- Is there a way for me to read STDOUT on the fly, as it happens, before the command I'm execing is complete? Background: I need to write a script that returns the names of all the hosts involved in a traceroute. This is fairly simple: ------------------------------------------------------------ #!/usr/bin/perl -w use strict; my $target = "qbridge.bu.edu"; # Default target if (defined $ARGV[0]) { # If they gave a different target $target = $ARGV[0]; } $target = lc($target); # Lowercase it # Get the output text for parsing, and supress console output my @results = qx/traceroute $target/; my @errors = qx/traceroute $target 2>&1/; if (!@results && @errors) { # What went wrong? print "Uh-oh:\n@errors\n"; exit; } my $lth = scalar @results; # Get number of lines (= # of hops) my $hostname = `hostname -f`; # Get local hostname (-f may not work some OSs) chomp $hostname; # Remove trailing space print "Results: $lth hops from $hostname to $target\n"; # Iterate over lines/hops to get hostnames my $ii=0; for ($ii=0;$ii<$lth;$ii++) { my @spot = split ' ', $results[$ii]; # Break on word boundaries $spot[1] = lc($spot[1]); # Lowercase the name print "$ii) $spot[1]\n"; # Print it } exit; ------------------------------------------------------------ If the host is pingable, or if the host doesn't actually exist, this works fine. The problem is the case in which this is likely to be used most often, in which a legitimate host doesn't have a route to it at the moment (which is why the diagnostic is being run in the first place), and so generates output like this: [mitch@jhereg advisor]$ traceroute dyn09.iacc-t21.ndsu.nodak.edu traceroute to dyn09.iacc-t21.ndsu.nodak.edu (134.129.71.204), 30 hops max, 38 byte packets 1 netdev98-254 (141.142.98.254) 12.878 ms 0.381 ms 0.341 ms 2 sbr0-vlan116.gw.ncsa.edu (141.142.0.65) 0.459 ms 0.543 ms 0.409 ms 3 198.17.196.2 (198.17.196.2) 3.025 ms 2.980 ms 3.038 ms 4 chin-mren-ge.abilene.ucaid.edu (198.32.11.97) 3.042 ms 3.178 ms 3.010 ms 5 iplsng-chinng.abilene.ucaid.edu (198.32.8.77) 175.039 ms 237.742 ms 256.378 ms 6 mn-abilene.northernlights.gigapop.net (192.42.152.170) 27.838 ms 27.764 ms 27.763 ms 7 ndsu-i2r.northernlights.gigapop.net (192.42.152.173) 34.522 ms 34.154 ms 34.337 ms 8 vlan-107.cc.ndsu.NoDak.edu (134.129.107.100) 44.434 ms 34.303 ms 34.304 ms 9 * * * 10 * * * The problem with my script above is that it relies on the command actually either completing or failing. This case is "in-process", and so does neither. When run via my script, no output occurs at all, as the qx// never comes back. So my question is: Is there a way for me to read STDOUT on the fly, as it happens, before the command I'm execing is complete? Thanks! Mitch -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ From ethomson at ravecomm.com Thu Oct 7 21:19:03 2004 From: ethomson at ravecomm.com (Ed Thomson) Date: Thu Oct 7 21:19:16 2004 Subject: [CMI.PM] Trapping STDOUT in-process? In-Reply-To: <3.0.5.32.20041007210241.010c6d58@pop.ncsa.uiuc.edu> References: <3.0.5.32.20041007210241.010c6d58@pop.ncsa.uiuc.edu> Message-ID: <4165F917.1050001@ravecomm.com> Hey Mitch- qx// will read the entire output into a buffer, and will wait for the process to complete before it continues. So, the program has exited by the time you get to your for() loop. Instead of running the command, then running the for loop over the output, try opening the program's output directly and running what's in the for() loop inside a while loop reading the input. Eg: open(TRACEROUTE, "traceroute $target 2>&1 |") || die; while() { .. print the lines .. } close(TRACEROUTE); I think this will help -- good luck! -Ed Mitch Kutzko wrote: > Hi, folks -- Is there a way for me to read STDOUT on the fly, as it > happens, before the command I'm execing is complete? > > Background: > > I need to write a script that returns the names of all the hosts involved > in a traceroute. This is fairly simple: > > ------------------------------------------------------------ > #!/usr/bin/perl -w > > use strict; > > my $target = "qbridge.bu.edu"; # Default target > if (defined $ARGV[0]) { # If they gave a different target > $target = $ARGV[0]; > } > > $target = lc($target); # Lowercase it > > # Get the output text for parsing, and supress console output > my @results = qx/traceroute $target/; > my @errors = qx/traceroute $target 2>&1/; > > if (!@results && @errors) { # What went wrong? > print "Uh-oh:\n@errors\n"; > exit; > } > > > my $lth = scalar @results; # Get number of lines (= # of hops) > my $hostname = `hostname -f`; # Get local hostname (-f may not work some > OSs) > chomp $hostname; # Remove trailing space > > print "Results: $lth hops from $hostname to $target\n"; > > # Iterate over lines/hops to get hostnames > my $ii=0; > for ($ii=0;$ii<$lth;$ii++) { > my @spot = split ' ', $results[$ii]; # Break on word boundaries > $spot[1] = lc($spot[1]); # Lowercase the name > print "$ii) $spot[1]\n"; # Print it > } > > exit; > ------------------------------------------------------------ > > > If the host is pingable, or if the host doesn't actually exist, this works > fine. > > The problem is the case in which this is likely to be used most often, in > which a legitimate host doesn't have a route to it at the moment (which is > why the diagnostic is being run in the first place), and so generates > output like this: > > [mitch@jhereg advisor]$ traceroute dyn09.iacc-t21.ndsu.nodak.edu > traceroute to dyn09.iacc-t21.ndsu.nodak.edu (134.129.71.204), 30 hops max, > 38 byte packets > 1 netdev98-254 (141.142.98.254) 12.878 ms 0.381 ms 0.341 ms > 2 sbr0-vlan116.gw.ncsa.edu (141.142.0.65) 0.459 ms 0.543 ms 0.409 ms > 3 198.17.196.2 (198.17.196.2) 3.025 ms 2.980 ms 3.038 ms > 4 chin-mren-ge.abilene.ucaid.edu (198.32.11.97) 3.042 ms 3.178 ms > 3.010 ms > 5 iplsng-chinng.abilene.ucaid.edu (198.32.8.77) 175.039 ms 237.742 ms > 256.378 ms > 6 mn-abilene.northernlights.gigapop.net (192.42.152.170) 27.838 ms > 27.764 ms 27.763 ms > 7 ndsu-i2r.northernlights.gigapop.net (192.42.152.173) 34.522 ms 34.154 > ms 34.337 ms > 8 vlan-107.cc.ndsu.NoDak.edu (134.129.107.100) 44.434 ms 34.303 ms > 34.304 ms > 9 * * * > 10 * * * > > > The problem with my script above is that it relies on the command actually > either completing or failing. This case is "in-process", and so does neither. > > When run via my script, no output occurs at all, as the qx// never comes back. > > So my question is: > > Is there a way for me to read STDOUT on the fly, as it happens, before the > command I'm execing is complete? > > Thanks! > > Mitch > -- > Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 > http://hobbes.ncsa.uiuc.edu/ > _______________________________________________ > Champaign-Urbana mailing list > Champaign-Urbana@mail.pm.org > http://mail.pm.org/mailman/listinfo/champaign-urbana From mitch at ncsa.uiuc.edu Thu Oct 7 21:56:39 2004 From: mitch at ncsa.uiuc.edu (Mitch Kutzko) Date: Thu Oct 7 21:55:24 2004 Subject: [CMI.PM] Trapping STDOUT in-process? In-Reply-To: <4165F917.1050001@ravecomm.com> References: <3.0.5.32.20041007210241.010c6d58@pop.ncsa.uiuc.edu> <3.0.5.32.20041007210241.010c6d58@pop.ncsa.uiuc.edu> Message-ID: <3.0.5.32.20041007215639.010c6d58@pop.ncsa.uiuc.edu> Perfect, Ed -- Exactly what I was looking for. Thanks! Mitch At 09:19 PM 10/7/2004 -0500, Ed Thomson wrote: > Hey Mitch- > > qx// will read the entire output into a buffer, and will wait for the > process to complete before it continues. So, the program has exited by > the time you get to your for() loop. > > Instead of running the command, then running the for loop over the > output, try opening the program's output directly and running what's in > the for() loop inside a while loop reading the input. > > Eg: > open(TRACEROUTE, "traceroute $target 2>&1 |") || die; > while() > { > .. print the lines .. > } > close(TRACEROUTE); > > I think this will help -- good luck! > > -Ed > > Mitch Kutzko wrote: > > Hi, folks -- Is there a way for me to read STDOUT on the fly, as it > > happens, before the command I'm execing is complete? > > > > Background: > > > > I need to write a script that returns the names of all the hosts involved > > in a traceroute. This is fairly simple: > > > > ------------------------------------------------------------ > > #!/usr/bin/perl -w > > > > use strict; > > > > my $target = "qbridge.bu.edu"; # Default target > > if (defined $ARGV[0]) { # If they gave a different target > > $target = $ARGV[0]; > > } > > > > $target = lc($target); # Lowercase it > > > > # Get the output text for parsing, and supress console output > > my @results = qx/traceroute $target/; > > my @errors = qx/traceroute $target 2>&1/; > > > > if (!@results && @errors) { # What went wrong? > > print "Uh-oh:\n@errors\n"; > > exit; > > } > > > > > > my $lth = scalar @results; # Get number of lines (= # of hops) > > my $hostname = `hostname -f`; # Get local hostname (-f may not work some > > OSs) > > chomp $hostname; # Remove trailing space > > > > print "Results: $lth hops from $hostname to $target\n"; > > > > # Iterate over lines/hops to get hostnames > > my $ii=0; > > for ($ii=0;$ii<$lth;$ii++) { > > my @spot = split ' ', $results[$ii]; # Break on word boundaries > > $spot[1] = lc($spot[1]); # Lowercase the name > > print "$ii) $spot[1]\n"; # Print it > > } > > > > exit; > > ------------------------------------------------------------ > > > > > > If the host is pingable, or if the host doesn't actually exist, this works > > fine. > > > > The problem is the case in which this is likely to be used most often, in > > which a legitimate host doesn't have a route to it at the moment (which is > > why the diagnostic is being run in the first place), and so generates > > output like this: > > > > [mitch@jhereg advisor]$ traceroute dyn09.iacc-t21.ndsu.nodak.edu > > traceroute to dyn09.iacc-t21.ndsu.nodak.edu (134.129.71.204), 30 hops max, > > 38 byte packets > > 1 netdev98-254 (141.142.98.254) 12.878 ms 0.381 ms 0.341 ms > > 2 sbr0-vlan116.gw.ncsa.edu (141.142.0.65) 0.459 ms 0.543 ms 0.409 ms > > 3 198.17.196.2 (198.17.196.2) 3.025 ms 2.980 ms 3.038 ms > > 4 chin-mren-ge.abilene.ucaid.edu (198.32.11.97) 3.042 ms 3.178 ms > > 3.010 ms > > 5 iplsng-chinng.abilene.ucaid.edu (198.32.8.77) 175.039 ms 237.742 ms > > 256.378 ms > > 6 mn-abilene.northernlights.gigapop.net (192.42.152.170) 27.838 ms > > 27.764 ms 27.763 ms > > 7 ndsu-i2r.northernlights.gigapop.net (192.42.152.173) 34.522 ms 34.154 > > ms 34.337 ms > > 8 vlan-107.cc.ndsu.NoDak.edu (134.129.107.100) 44.434 ms 34.303 ms > > 34.304 ms > > 9 * * * > > 10 * * * > > > > > > The problem with my script above is that it relies on the command actually > > either completing or failing. This case is "in-process", and so does neither. > > > > When run via my script, no output occurs at all, as the qx// never comes back. > > > > So my question is: > > > > Is there a way for me to read STDOUT on the fly, as it happens, before the > > command I'm execing is complete? > > > > Thanks! > > > > Mitch > > -- > > Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 > > http://hobbes.ncsa.uiuc.edu/ > > _______________________________________________ > > Champaign-Urbana mailing list > > Champaign-Urbana@mail.pm.org > > http://mail.pm.org/mailman/listinfo/champaign-urbana > _______________________________________________ > Champaign-Urbana mailing list > Champaign-Urbana@mail.pm.org > http://mail.pm.org/mailman/listinfo/champaign-urbana > > -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ From lewart at uiuc.edu Mon Oct 18 10:45:10 2004 From: lewart at uiuc.edu (Daniel S. Lewart) Date: Mon Oct 18 10:45:13 2004 Subject: [CMI.PM] Meeting Mon Oct 18 6-8pm @ Manzella's In-Reply-To: <41656667.8070508@uiuc.edu> References: <1095939352.4641.10.camel@bprice2kl.atgf.com> <41656667.8070508@uiuc.edu> Message-ID: <4173E506.9030409@uiuc.edu> Champaign-Urbana Perl Mongers, > I hereby announce that our next meeting shall be: > * Mon Oct 18, 2004 6-8pm > * Manzella's Italian Patio > * 115 S First St / Champaign That's tonight! Benevolently, Dan http://cmi.pm.org/