| |
| |
| |
|
Comments:
<0> why s = dir "" and system(s) returns 123 <0> and s = dir " " returns 1 ? <1> what? <1> what are you doing? and what's wrong? <0> just spent hours re doing string s = dir " " and then system(s) returned 123 <0> whilst s = dir " " and system(s) returned 1 <0> Nope; its a DOS response ie if dir " " where the " " incloses a tab then response 123 <0> whilst if dir " " where the " " incloses a space then returns 1 <2> ****ty <0> what? <2> nevermind <2> dont mind =) never is no good
<0> should i post the other 90999 awk mistakes i have made today? <1> yes <0> ok; i re read the book yet again; he suggests using $1 ~ $2 for testing ones understanding of regular expressions. <1> indeed <0> indeed; why does \5 have meaning in gsub() ?? <1> can you paste the line? <0> im so mad; will try to find it <1> \5 is backreference syntax <0> doesnt it say any literal that is Not a metachatacter is itself eg \z should be same as 'z' ? <1> what is the gsub line? <0> found it: <0> cmd /c %awk% "{gsub(/5/,\"xx\");print}" &pause <0> a5cv--> axxcv <1> where is the \5 ? <0> cmd /c %awk% "{gsub(/\5/,\"xx\");print}" &pause <0> a5cv--> a5cv <0> ie first is as expected the 5 goes to xx <0> but second; the \5 does not go to xx ?? <0> no idea whay the \5 is special in gsub? <0> every time i post it seems to screw up .. <0> the irc is unbeliavable; as soon as you post anything that confronts anyone; then you are banned <3> HuH? <3> ronins: What's up? <3> ronins: Nobody /banned you. <0> sorry i thought i posted legitimate questions; then banned off #distributed <3> ronins: HeH. <3> ronins: Maybe it's how you asked, rather than what you asked, that triggered the /ban. <3> ronins: Ignore them. It's just IRC. <0> thanks Eugene; its rod-cal from sacto <0> did you see my posts from above? <3> ronins: I saw them earlier; they made no sense ;) <3> ronins: So I ignored them. <0> well my posts made no sense; at least you did not ban me for so <3> ronins: I don't /ban people for no reason. <3> ronins: I may /kick people occasionally. <3> ronins: But a /ban is only the result of something nasty. <0> i can be nasty; but not on this channel for it is 'awk' <0> off topoic: rtsp://rmv8.bbc.net.uk/london/aod/normanjay.ra?start=06:00 <0> Bring It !! 94.9 <0> unbelivable now:rtsp://rmv8.bbc.net.uk/london/aod/normanjay.ra?start=06:00 <2> moorning <2> elge: update your mirror of my page <4> I want to do some math on the number in /proc/meminfo on a linux system.. something like "awk '{{if(/^MemTotal/) print $2} minus {if(/^MemFree:/) print $2}}' < /proc/meminfo" - only working :) <5> kolla: awk '/^MemTotal/ {tot=$2} /^MemFree/ {fre=$2} END { print tot - fre}' /proc/meminfo <4> ok, I need to make variables, <2> kolla: see xmb.ath.cx/code/x_free <4> ok, thanks :) <4> cool <2> yea <4> hm <4> different versions/variants of awk answers this one differently...
<4> awk '/^SwapTotal:/ {print "swap.value "$2*1024}' < /proc/meminfo <4> some answers for example 2.15498e+09 :) <2> bad habit '.thing' <2> waste of space and logic <2> why * and not / <4> to multiply? <2> why <2> usually you divide ram <4> to feed into a system that expects "bytes" <2> the value is in bytes no? <4> no, kB <2> i see <4> $3 is kB :) <2> try printf ".10f", $2 * 1024 <2> or something <3> xmb: %d might be best. <2> yea well <2> like your +v ? :) <3> xmb: Sure. <2> gg <2> you cook-er <3> xmb: goldfish has been really quiet since I +o him :) <2> yea <2> dunno =) <3> xmb: Yeah, he's still got it. <3> xmb: Even afte a couple of net splits. <2> gg <2> got me a scripting idea? <2> the last script is called find_files.sh <2> it finds <single_file[s]> definitions found by find(1) <3> xmb: I had a great interview question script. I should ask you that one. <2> ask questions simply? <2> i have one like that already <2> randomly say things <3> xmb: I'll have to remember the question and the conditions. <3> xmb: One of those where you have to do something but awk won't let you backtrack, etc. <2> you mean a manuscript or a script <2> we need awk2 <2> lets code pred <2> i give specs, you code the C based on mawk <2> its simply additions to the awk proto/lang <2> like every /regex/ should produce RSTART and RLENGTH <2> then also grouped regex support <4> I use %d, thanks for the tip <3> xmb: I'd rather remove regex from awk altogether. <2> uhhh no <2> wtf <2> regex is a very important part <3> xmb: Regex ****s. <2> uh it owns <2> what alternatives can you show <2> what would u use to parse homeless html <2> or homeless weird data <2> regexes =) <2> mac needs such an inventation <4> I typically want a "match everything but <pattern>" and strugle hard every time :) <4> from amigados I was used to ~(pattern), and extended globbing in bash and zsh has similar solutions <4> but with regexp, my brain quickly gets hot :) <4> some way of "flip" the pattern matching would be nice <4> s/of/to <3> kolla: HeH.
Return to
#awk or Go to some related
logs:
changin localhost gentoo kdeartwork-kscreensaver blocking wich audio drivers #lisp mupen64 troubleshooting #debian firefox lagging horribly kubuntu apt-get install imap fc3 ubuntu speech-to-text libpangoxft undefined symbol: g_intern_static_string
|
|