@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> I'm trying to check if '22 Jan 2007 21:43:49' is within the last 24 hours, if it is, print line. Is there an easy way to do this?
<1> with awk?
<0> Yeah
<1> I'm sure someone has done it.
<0> I'll go test my googlefoo then.
<1> http://wooledge.org/mywiki/BashFaq#faq70
<1> might be of help.
<1> NOTE: It doesn't use awk.
<0> goldfish: looks like there's actually a mktime function
<0> goldfish: this actually worked for me - awk '{ if(mktime($5" "01" "$3" "$6" "$7" "$8) > (systime() - 86400)) print 1 }'
<2> pimpin
<2> reset by queer.. not
<1> .....?
<2> nm



<2> me
<1> You are queer, yes.
<2> umm
<2> you mind the 'reset by' too
<2> foo
<2> nm
<2> =)
<3> pr3d4t0r; have you actually contributed anything to the channel besides kissing tag's ***?
<3> funny how some dip**** can come to a channel , **** off the founder , get +o and just start banning old-timers
<3> as if he actually somehow deserved that capability
<3> no worries, people like you eventually get what they deserve
<4> uniplex: Uh... what exactly is your problem?
<3> pr3d4t0r; have you forgotten already?
<3> pr3d4t0r; my problem is some dip**** that thinks they have a right to be in a channel for a couple days and ban people that been there for years
<3> but like i said, no worries
<4> uniplex: And what exactly is your problem?
<3> you're not too bright are you
<4> uniplex: I just don't understand what your problem is, or why you're going out of your way trying to insult me.
<4> uniplex: I don't even know who the **** you are.
<3> i explained the problem clearly, maybe you bumped your head once or twice too many
<5> Moin!
<5> I plan to parse a file and search for line that are not matching patterns ... there will be a lot of patterns of lines i'm not interestes in ... what would be the easiest way to exclude them?
<5> A long line of /fooline/ || /foobar/ || /barfoo/?
<6> whats the awk equivalent of sed 's/.*=//'?
<2> dorel__: sub(/.*=/, "")
<6> no, that's not what I want...
<6> the string is like: var=value and I want just value printed
<4> Good morning.
<2> morning
<2> dorel__: xmb.ath.cx/code/s/extract_vars.awk
<2> you need a ; print afterwards in code
<2> its a keyword to print $0
<6> I do have a ;print :P
<6> nm, I will approach this a different way
<1> awk '{print gensub(".*=","",1,$0)}'
<1> Gawk only.
<1> awk '{print substr($0,index($0,"=")+1)}'
<1> kanaldrache: !/(moo|foo|doo|roo|soo|)/
<1> last | is a typo
<4> Greetings from Bentonville.
<4> goldfish: Who is that guy uniplex?
<4> xmb: ^^^
<7> ls -l | awk '/\<a.*$/ {print $9}'
<7> i execute that in my /etc but i exoected to see only files that begin with a and i saw hosts.allow..How come?
<7> anybody alive?
<4> marinosi: What's up?
<8> ls | grep ^a.*
<7> pr3d4t0r, ?
<7> beebum, ok i just want to do it with awk :-P
<7> pr3d4t0r, fine thanks
<8> you started with ls -l
<7> so?
<8> i ***umed other shell commands were ok as well
<7> ls /etc/ | awk '/\<a.*$/ {print $1}' : this prints hosts.allow too
<7> oh no i do it for educational purposes
<7> otherwise i do ls /etc | sed -n '/^a/p'



<7> :-P
<8> ah
<7> so any idea about that?
<8> # ls -l | awk '/ a.*$/ {print $9}'
<7> beebum, oh no...that will dump also words like blah because in the regex you did not define that the word starts with a.So awk will search inside the word too
<8> it has to start with a space
<8> so it will not get blah
<7> ahmm i didnt see space
<7> :-P
<7> but could you plz explain me why this ls /etc/ | awk '/\<a.*$/ {print $1}' prints all the correct files that start with a but hosts.allow too
<7> may it ***umes . as a delimeter?
<7> w
<8> i don't think regular awk supports \<
<7> it does.
<9> marinosi, what's \<?
<8> marinosi, i can't fine \< in the docs for regular awk. are you sure that's what you are using?
<7> regular awk is gawk correct?
<8> no
<8> gawk has a bunch of stuff awk doesn't have
<7> ok then ...i was talking about gawk sorry
<9> marinosi, still: explain!
<8> Rado, \< is supposed to match at the beginning of the word. but i don't usually use gawk so i'm not that familiar with it's usage
<9> beebum, a) I wanted marinosi to explain, b) your answer is still not _exact/ clear_ enough.
<9> Or rather, it won't help marinosi recognize his error. ;)
<8> sorry :-/
<9> '.' is not a word element.
<9> beebum, marinosi is too busy in other channels. ;)
<8> hehe
<7> Rado, where is the wrong..sorry i was talking to another channel
<7> \< matches the beginning.
<7> so the regex '\<a.*$' should match every word tha begins with a..(using gawk) why hosts.allow too?
<9> because allow begins with a
<7> the file is hosts.allow not allow alone
<7> it takes dot as a delimeter?
<9> marinosi, scroll up what I said about '.'
<9> marinosi, or even better, "man gawk" and read what \< means.
<9> I.e. how "word" is defined.
<7> ahmmm ok
<7> thanks a lot
<8> heh, you gotta love those "ahmm" ;-D
<4> beebum: HeH.
<4> beebum: I think it conveys "I saw it happen, I understand it congnitively, but I don't feel it in my gut yet."
<8> lol
<1> pr3d4t0r: yo.
<4> goldfish: What's up?
<1> Just back from the gym. Ta alan tuirseach orm.
<1> I am tired in Irish.
<1> pr3d4t0r: You were asking about uniplex?
<4> goldfish: Yeah. What's up with that guy?
<4> goldfish: Do you know him?
<1> I know him from IRC.
<1> He does like to take his anger out on IRC :)
<4> goldfish: I guess.
<4> goldfish: I figured I /kicked him at some point for being an ***hat and he showed up again, still being an ***hat. I didn't even know who the fux0r is.
<1> What happened, someone ban him or something? then he got angry?
<1> Ah right.
<1> Hm, let's say, I have a line, 100 chars long, what would be the best way to split it up into 4 lines, of 25 chars each. It wouldn't be split on a specific 'char', but rather char number, if that makes sense.
<1> I suppose a loop with substr(), could work.
<10> first 25 char of each line: awk '{ print substr($0,1,25) }' filename
<9> gsub(".{25}","&\n");
<9> If that works with {} ranges.
<9> If you knew how to insert \n in sed it would be simple. ;)
<1> Yeah, have it in sed, but, i'm already processing the text with awk :(
<1> I'll play around, thanks.
<9> Otherwise you'd have to type out .x25


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #awk
or
Go to some related logs:

#python
#math
kpersonalize suse
#asm
xandros4 iso
skywi spam
mythfilldatabase cron debian
76income
Could not find an installation of OpenSSL ubuntu
query to know the no of columns in a table using mysql



Home  |  disclaimer  |  contact  |  submit quotes