| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Comments:
<0> Rocket J. Squirrel? <1> aye aye? <2> apparently, nobody here goes to midnight movies <2> especially RHPS <1> hobbs :P <1> merlyn, **** that? :) <2> "janet - dr scott - janet - brad - rocky - (unh!)" x 3 <3> I know rhps, but I still can't connect daveman => rocky <2> it was the name-only greetings <1> :p wtf? <3> ahhhh <3> damniot <1> merlyn, you would mock Doc Fraiser? <1> I have no idea. <2> I don't know who doc fraiser is. <1> :O
<1> thar she blows! <1> :P <1> thar she goes! <1> :P <4> to many names start with da >.> <5> get a smarter tab ! <4> well I when I asked at the shop for a keyboard with a smart tab key they kept trying to sell me a wireless microsoft keyboard, so I guessed they was awarded after years od dedicated abuse or something :| <5> :) <4> hmmm I wonder if you can actually change how xchat handles tab anyway <4> ,bot test <4> hmm, that didnt work <6> bop <7> GumbyBRAIN: tab it <8> Most of you to glance through and pick it up, its not a smart tab key they kept it and he gets it? <9> I want to read files. <9> I'm able to open them, but don't know how to handle the input. <4> while (<handle>) { print $_; } <10> Holy crap <10> vim7 has been compiling now for well over 2 hrs <10> wtf. <11> This is why God invented binary packages <10> Dude the vim7 make file must be jesus and a half. <10> checking for tgetent()... configure: error: NOT FOUND! <10> it was looping <10> how silly. <10> I would go binary but there are none for dapper <7> the only supercool thing I saw in vim7 was horizontal split screens. <10> so me = s.o.l. <10> vim6 has horizontal split screens. <11> Ecarroll: Pull the .deb from debian unstable? <10> vim -o <12> Does anyone know a regular expression that works to get the IP address of a given interface in linux? <7> or vertical split screens, maybe <12> I'm trying /ip addr:(/S+)/ without much luck <3> vim6 had vertical, too <10> revdiablo: probably not a sound idea anymore <7> oh, well **** vim7 then <11> jpeg: Vim 6 had that, too. The big new thing in vim 7 is tabs <3> oh <10> jpeg: vim -O <12> tabs .. are .. GOOD! <10> vim7 has syntax completion... <13> Does anyone know how to compile a Perl script with PAR, and include the .glade file also? <12> vim7 has better syntax highlighting <5> jpeg: what about the completion menu? or spell checking? <14> Martyn: hostname -i? <5> or the new(shiny!) text objects! <12> andrejkw: .glade file?? <3> You could try switching to debian. Mine works in unstable, and I'm using a powerpc (merlyn!) <11> Ecarroll: As long as there aren't dependency issues, I don't see why not. Of course, there may well be depency issues <12> dondelelcaro: no, I specifically need to get eth0, eth1, etc... <7> Botje: eye am a purfek spelar <13> Martyn: Glade XML <14> Martyn: then ifconfig eth0 | awk '/inet addr:/{sub"addr:","";print $2}' <12> So I am doing a my @configinfo = `ifconfig $interface` and then trying to parse the output
<11> Martyn: On linux? <12> rev : Yep. <3> Syntax error at or near addr: <12> andrejkw: You're using glade/perl bindings? Interesting :) <11> Martyn: /inet addr:(\S*)/ <12> *, not +? <13> Martyn: yes. <12> AHA! <11> Martyn: Though a it might be better to use Net::Ifconfig::Wrapper and let it do the hard work for you <12> andrejkw: PAR isn't going to handle that very politely. <13> Martyn: but it's annoying have to ditribute the .glade file with my binary. <11> s/a it/it/ <12> revdiablo: It's an embedded system, so I don't have the freedom/ability to CPAN in a module.\ <11> Martyn: Why would you do '+?' <12> revdiabo : Well, + does the match_all too <14> errr that should be ifconfig eth0 | awk '/inet addr:/{sub("addr:",""); print $2}' <11> Martyn: You don't usually need to do a non-greedy match with something as specific as \S <11> But + would be fine, I just generally use * unless I have a reason not to <10> I'm creating a debian chroot now <10> and I'm out to lunch -- later all. <12> revdiablo : Oddly though, the regexp is not working . <11> $ /sbin/ifconfig eth0 | perl -nle 'print for /inet addr:(\S*)/' <11> 192.168.1.2 <11> Works For Me (tm) <2> eth0: no such interface <2> so it works, but isn't portable <11> I suggested he use Net::Ifconfig::Wrapper already <2> I have bge0 for my primary ether interface <12> inet addr:10.54.0.5 Bcast:10.54.0.255 Mask:255.255.255.0 <12> Is what is getting returned <11> Martyn: Are you printing the entire matching line, rather than using the captured group? <11> Hi, Yaakov <12> I am doing $ifconfig=`ifconfig eth0`; then $ip =~ /inet addr:(\S*)/; <15> Hello, revdiablo. <11> Martyn: '$ifconfig' and '$ip' are two different variables <16> alright, goin' home today! <12> Sorry, I forgot a step <15> It is 92.2F here right now. <16> no more texas <15> That's too hot. <17> Martyn: dump the contents of $ifconfig (maybe ifconfig is not in your path, it's in /sbin here) <15> tag: Sounds like a good thing. <11> Yaakov: Where are you at? <6> it's actually cool in Tempe today <15> Indiana <6> well, 85 <17> also make sure the interface does have an inet address, it could have only ipv6, though that's unlikely <15> It's stupid hot. <11> It's a blistering 71F here in sunny southern california <12> @ifconfig=`ifconfig eth0`; $ip=@ifconfig[1]; $ip =~ /inet addr:(\S*)/; <18> weather denver? <18> poop <15> I would like 71, that's my kind of temperature. <15> 92 is WRONG <12> it does have an address .. 10.54.0.5 <11> Martyn: You should use $ifconfig[1] to get the 2nd element in the array @ifconfig <17> what does $ip contain? <11> Martyn: But that's probably more work than you need to be doing. You can get away with: my $ifconfig = `/sbin/ifconfig eth0`; if ($ifconfig =~ /inet addr:(\S+)/) { print "$1\n"; } <12> rev : It's returning " inet addr:10.54.0.5 Bcast:10.54.0.255 Mask:255.255.255.0" <16> it's hot <11> Martyn: What is returning that? <16> in texas <16> real hot <12> $ip <16> it ****s <16> heh <11> Martyn: Matching on a variable doesn't change it. <17> and after the match, doesn't $1 contain the rigth thing? <12> In the function I addressed above .. It's like the =~ is having no effect <12> revdiablo: Oh! <12> revdiablo: What do I need to do to change it? <11> Martyn: You might be thinking of s///, but that would be an unnecessary complication here
Return to
#perl or Go to some related
logs:
cinerela #math spell kile ubuntu #linux execv cdrecord sadarax force eth0 linux ubuntu #physics NO_PUBKEY EA8E8B2116BA136C navicat mysql.proc doesn't exist
|
|