Search the web
Sign In
New User? Sign Up
geeksthatgawk · for GNU Awk questions & discussions
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 108 - 143 of 221   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
108
Hi, Could anyone here share a wrap function? something like: function wrap(long_line, columns) { ... } Daniel...
Daniel Ajoy
daniel_ajoy
Offline Send Email
Jul 28, 2004
1:51 am
109
Hello, Have several shell scripts, that issue sed and awk commands that have worked will for years on SCO Unix. We are moving our application to a new Redhat...
barryshadduck
Offline Send Email
Sep 2, 2004
5:55 pm
110
... have ... to ... Hello Again, Found that shell scripts and awk programs work fine. It was just the transfer process that added something to each end of...
barryshadduck
Offline Send Email
Sep 3, 2004
7:14 pm
111
I have a set of files that need to have a number assigned to $3 for each record, but if the record has the same value in $2, the value in $3 must stay the same...
d_godfrey2000
Online Now Send Email
Sep 7, 2004
9:21 pm
112
In order to achieve what you give in your example, I would suggest this: BEGIN {FS="|"; OFS="|"; last="";} { if ($2 != last) { last = $2 line++; } $3 =line; ...
Albert Bickford
albert_bickford
Offline Send Email
Sep 9, 2004
1:13 am
113
pl. help. I have large data files that separated by numeric file extensions. I need t process them in order and compile the necessary info. What is the best...
shahjb40
Offline Send Email
Sep 9, 2004
1:51 am
114
I have used gawk for similar applications. Since it processes files sequentially, it can handle very large files. The only significant limits are the speed...
Albert Bickford
albert_bickford
Offline Send Email
Sep 9, 2004
2:26 am
115
Here is the file structure. The file name, for example could be EPAXXXXX.001 The extension (file type) can range from “.001” to “.124”. There can...
Jagdish Shah
shahjb40
Offline Send Email
Sep 9, 2004
5:56 pm
116
... Thanks Albert! Your solution works great. I did have to change it to fit my actual file format - here are a few lines (bear with me - I'm showing the REST...
Don Godfrey
d_godfrey2000
Online Now Send Email
Sep 9, 2004
6:29 pm
117
Okay, so it sounds like you've got two different counters which vary independently, which are embedded in the file names. So, one way to accomplish that would...
Albert Bickford
albert_bickford
Offline Send Email
Sep 11, 2004
12:48 pm
118
From what you've said below, it sounds like you've handled things more or less the way I would have done it. Perhaps there is a more elegant way, but one of...
Albert Bickford
albert_bickford
Offline Send Email
Sep 11, 2004
12:48 pm
119
... The reason I was trying to do it in one script, was for speed - I'm processing about 1 million records each time I run it, and doing quite a few other...
Don Godfrey
d_godfrey2000
Online Now Send Email
Sep 11, 2004
4:54 pm
120
... few ... I'm afraid I don't know that. You might have to do some testing to find out. I was speaking before from the perspective of optimizing development...
Albert Bickford
albert_bickford
Offline Send Email
Sep 12, 2004
1:19 pm
121
With help of someone, for my immediate need, I was able to do the following and was able to process the files. #! /bin/bash for ( j = 1; j < 125; j++ ); do ...
Jagdish Shah
shahjb40
Offline Send Email
Sep 13, 2004
5:36 pm
122
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...
d_godfrey2000
Online Now Send Email
Oct 12, 2004
8:47 pm
123
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...
ronzanibr
Offline Send Email
Oct 13, 2004
4:19 pm
124
... 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...
Don Godfrey
d_godfrey2000
Online Now Send Email
Oct 13, 2004
4:54 pm
125
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 ...
Don Godfrey
d_godfrey2000
Online Now Send Email
Oct 13, 2004
5:07 pm
126
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
Offline Send Email
Oct 13, 2004
5:37 pm
127
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...
Don Godfrey
d_godfrey2000
Online Now Send Email
Oct 13, 2004
7:05 pm
128
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...
Ambrosio Berdijo
aberdijo
Offline Send Email
Oct 14, 2004
12:57 pm
129
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...
Don Godfrey
d_godfrey2000
Online Now Send Email
Oct 14, 2004
2:20 pm
130
put the following script in test.awk BEGIN { keyfile = ARGV[1]; delete ARGV[1]; # print "loading key file " keyfile; while (getline < keyfile) { keyvalue =...
Ambrosio Berdijo
aberdijo
Offline Send Email
Oct 15, 2004
5:29 pm
132
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...
Don Godfrey
d_godfrey2000
Online Now Send Email
Oct 16, 2004
12:55 pm
134
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 ...
Ambrosio Berdijo
aberdijo
Offline Send Email
Oct 23, 2004
10:56 am
136
... 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...
Don Godfrey
d_godfrey2000
Online Now Send Email
Oct 24, 2004
10:28 pm
137
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 ...
jy_suarez
Offline Send Email
Oct 27, 2004
8:47 pm
138
... I think you've left out 'BEGIN'. And if you want the delimiter to be a part of the output, try: gawk 'BEGIN {FS=",";OFS=",";} {print $1,$2,$3}'...
Don Godfrey
d_godfrey2000
Online Now Send Email
Oct 27, 2004
9:29 pm
140
Thanks men it works exactly like i want it ... the ... be a part...
jy_suarez
Offline Send Email
Oct 28, 2004
1:23 pm
143
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...
Albert Bickford
albert_bickford
Offline Send Email
Nov 1, 2004
5:12 pm
Messages 108 - 143 of 221   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help