Greetings, I have about 1.5 million records that need to be updated, based on the value in the 1st field (pipe delimited). Loading the records into a database...
Hi gawk gurus, I have an input file that is only one great line, with no field separator. The fields have fixed width. (files from mainframe). for example, an...
... A combination of sed and awk can make this work fairly easily (I'm working on a bash shell, so you may need to tweak this if you use Windows: $ sed...
I noticed the set of sed & awk commands got broken into 1 too many lines. All of this belongs on one line: sed 's/\(.\{14\}\)/\1|/g;s/|/|\n/g' source_file|sed ...
Thanks Don thats a solution! But think about large files (around 3 GB). Thats would be resource intensive, and I would spent disk space, since the original...
Ronzanibr, Both awk and sed have you direct your changes to a new file (though you can perform some tricks to overwrite the source file), so the disk space may...
Hi, I am assuming here that you have the values of the 18,500 records in a text file with this format: 7217878112 |100271|600 -|LRG| so $1 is the key and $2...
I do have the 18500 records in a file, but I don't understand what exact syntax I need to use. Here is what I've got, but it isn't working: array values are in...
put the following script in test.awk BEGIN { keyfile = ARGV[1]; delete ARGV[1]; # print "loading key file " keyfile; while (getline < keyfile) { keyvalue =...
Ambo, Thank you, that works! I did change the last part to 'print $0 upd_key[$1]' since I wanted all of the fields from the sls_test3 file, plus the values...
Hi Don, Sorry for the delay, been very busy lately. OK, to understand this just look at the data we are loading into the upd_key, the "upd_key" file contains ...
... For my data, I can't count on there being a space anywhere - the data in 'upd_key' file is 4 fields, pipe delimited. Also, the 'keyvalue' isn't necessarily...
Hi guys, my situacion is this im trying to do a bash script and when i try this $ grep adyac 2510.log|gawk '{FS=","};{print $1,$2,$3}' to this data ...
Question: Who is the moderator of this list and has control over it? Is there anything that can be done to prevent SPAM postings such as the ones we've been...
I'd also like to find a way to stop the spam that is being sent through this group. From checking the members list, it appears no one is listed as the ...
I'd also like to find a way to stop the spam that is being sent through this group. From checking the members list, it appears no one is listed as the ...
Don: The main duties of a moderator are to control the list. Mostly, this is just a matter of setting restrictions on the list (who can join, who can post,...
It is a good idea to block the spammer, but we need to think it through before we deny anyone the right to join (potentially a legal issue?). In my opinion, ...
Good points. Presumably, yahoo allows the list owner to restrict members from browsing the list of people subscribed. Those are both things to look into once...
I have not heard of this use of AWK, and frankly, would be surprised at it. AWK was designed to do systematic transformations of text files and is very weak on...
here's a link to an article on AWK AI: http://www.cs.wustl.edu/~loui/sigplan it's where I read about AI in AWK. they talk about using AWK as an AI teaching...
But one thing you can't do with awk is something like this: BEGIN { variablefunction = "myfunc" variablefunction(2) exit } function myfunc(a) { return a+2 } Or...
Logo-esque AWK! I thought your pseudocode-style looked familiar! :D Logo is great! thanks for the link. once, I wrote a functional interpreter in Logo, nothing...
... This should have been: BEGIN { variable = "a" functiondef = "myfunc(" variable ") {return " variable "+2 }" define(functiondef) myfunc(2) exit } Anyway,...
why not have a look at my neuron in awk? curse the perfectionist in me! I am not happy with the code. it trains the simulated neuron to be an "or" gate, but it...
... there ... we've ... I, for ... incrreases, and I ... I am the owner of this group and only moderator. My apologies for the delayed deletion, banning, and...