| |
| |
| |
|
Comments:
<0> Greetings. <1> Helo to you too <0> iSteve: 250 pr3d4t0r.cime.net OK <0> iSteve: ;) <1> MAIL FROM: isteve@irc.freenode.net <0> 250 OK <1> RCPT TO: pr3d4t0r@irc.freenode.net <0> 250 OK <1> DATA
<1> Hidely hodely, neighborino? <1> . <0> 300 RECEIVE <0> 250 OK <1> QUIT <2> hmmmmm <0> /msg #awk iSteve Dude, we're too geeky for our own good. <1> I am tired and intoxicated <0> iSteve: Ah! You'll sleep well tonight then. <1> eh, yea, smashing five hours <1> way to go! <1> I've helped myself to a great dinner though, so I started it, enjoyed it with and continued with good white wine <3> can you use multiple field seperators in awk? I want to seperate by "/" and " " <2> The field seperator is a regex <2> echo "a.b c" | awk -F'[. ]' '{print $1,$2,$3}' <3> oh i see <3> thanks <2> Well, it can be used as a regex, i mean. <3> how can i create a string by concatinating fields? like everything="$1$2$3" <4> hedpe_: like that, except use ${1}${2}... <4> oh, this isn't #bash <4> :) <4> hedpe_: $0 is all the fields <3> jp-: i don't want all fields <4> check out sprintf() <4> everything = sprintf("%s%s%s", $1, $2, $3); <3> thanks <4> np <0> /kick hedpe_ <0> /smack hedpe_ <0> hedpe_: Still not reading the docs? <0> Hello. <0> Greetings. <1> hello to you!
<1> can I, using awk (mawk specifically) simulate multidimensional arrays in some sane fashion? I can do array[number1"x"number2] = value, but that is not sane fashion I'd say:) <0> iSteve: nX[1,1,1] = 42; <0> iSteve: nX[1,2,1] = 69; <0> iSteve: And so on. <1> ah <1> neat <0> iSteve: Your mileage may vary. It may not work with Solaris awk. <0> iSteve: That one is hopelessly out of date. <1> oh no matter <0> iSteve: It ought to work with the moderm awks. <1> it's gonna run of puny linux boxes <1> or maaaaaybe netbsd <0> iSteve: If NetBSD runs on the same boxen as FreeBSD/Darwin, it'll work. <1> Can I perform something like shift? ie. echo "a b" | awk '{ make_believe_shift; print $1; }' should print out "b" instead of "a" :) <5> iSteve, you can use $a, where "a" is a var that you can modify. <1> hmm, that is true <6> Pity delete $1 doesn't work. <6> $0=substr($0,length($1)) is close though <2> [@] echo "a b c" | awk '{$1="\b"; print}' b c <7> hi <7> I want to save something in awk in a variable but it doesn't work and I don't know whats wrong <7> 6 check_func=substr($2, 0, index($2, "]") - 1); <7> 7 print "CHECK_FUNCTION_EXISTS(" $check_func <7> $check_func is not the substr, why? <1> not $check_func <1> print "blabla" check_func "bla bla" <7> thx <8> hi <8> is there an easy way to parse accents with awk independient of encoding? <8> I'm having serious problems trying to replace "" with "´", etc. <1> no, there is not; awk in general cares not of encoding... you'll probably have to a) convert it to a single encoding during preprocess and have the script expect that, b) identify encoding (eg. using 'enca') and have per-encoding functions or conversion tables that do what you want. <8> I use iconv and translate the text to 8859-1, but later I dont know how to match a '' <8> It's hard when you have your system locates with utf-8, so perhaps it's not a good idea. :) <8> I just want a simple script to convert accents to html encoding in some html files. <8> To identify encoding currently I'm using 'file'. <1> heh <1> I suggest tyou translate it to unicode instead <1> ;) <8> Yeah, but I try with a simple editor to make a simple awk match with // print "" with no success and it's really simple. :-) <8> And the parsed text is also in unicode.
Return to
#awk or Go to some related
logs:
sasl_password_maps isoinfo segmentation fault #mysql #php amavis-new Relay access denied ubuntu aterm antialiased #perl efnet math POTD
mythtv even channels #kde
|
|