Search Results

Search: Posts Made By: aachave1
1,277
Posted By aachave1
Keep only the closet match of timestamped row (include headers) from file1 to precede file2 row/s
This is a question that is related to one I had last August when I was trying to sort/merge two files by millsecond time column (in this case column 6).

The script (below) that helped me last...
1,298
Posted By aachave1
Thank you! So far the very first example you gave...
Thank you! So far the very first example you gave me seems to work much better than what I had. I just put my "combine" code within your code and it separates the groups. I will do some more thorough...
1,298
Posted By aachave1
Process split files with same name by group
File examples

f17_mar_01_02_03_04_fsw1.xml
f17_mar_01_02_03_04_fsw2.xml
f17_mar_01_02_03_04_fsw3.xml

f17_feb_13_20_49_06_fsw1.xml
f17_feb_13_20_49_06_fsw2.xml
f17_feb_13_20_49_06_fsw3.xml
...
1,395
Posted By aachave1
Okay, thank you! Let me try this and get back...
Okay, thank you! Let me try this and get back with the results.

---------- Post updated at 05:19 PM ---------- Previous update was at 04:59 PM ----------

Don, that script seemed to work very...
1,395
Posted By aachave1
Here are the full input (..fsw1952) and output...
Here are the full input (..fsw1952) and output (..fsw1953) files attached. As you can see, after I run the code from my initial post, the output file (..fsw1953) only contains the header pattern...
1,395
Posted By aachave1
Keep only columns in first two rows based on partial header pattern.
I have this code below that only prints out certain columns from the first two rows (doesn't affect rows 3 and beyond). How can I do the same on a partial header pattern “G_TP” instead of having to...
5,194
Posted By aachave1
Thanks you Don!
Thanks you Don!
5,194
Posted By aachave1
Quick question for RudiC or Don Cragun. What...
Quick question for RudiC or Don Cragun.

What is this actually used for in the previuos code? T[18] = "ZZZ"

Thanks!
5,194
Posted By aachave1
After modifying RudiC's last code, it seems to...
After modifying RudiC's last code, it seems to sort correctly by sorting on field 18 of these older files that actually have many file2 rows to one file1 row - where one of the timestamps appears to...
5,194
Posted By aachave1
Don, Again, part of my confusion is me not...
Don,
Again, part of my confusion is me not interpreting your questions properly. Initially (#5), I was not sure what was the best way to sort/merge file1 and file2. I knew what result I needed (as I...
5,194
Posted By aachave1
Okay, I apologize Don, I am having a hard time...
Okay, I apologize Don, I am having a hard time getting this across. Hopefully I can answer some the of questions.

1. Will you guarantee that all timestamps in both of the files that will ever be...
5,194
Posted By aachave1
RudiC, this seems to work on my "real" files in...
RudiC, this seems to work on my "real" files in different scenarios (i.e different file1 and file2 sizes, header sizes, header names etc..

I will do some more testing since my real files are very...
5,194
Posted By aachave1
Hi Don, sometimes IT at my work are doing...
Hi Don, sometimes IT at my work are doing maintenance on the weekends which causes me to lose remote access to my PC. My PC is running on windows 8, but I remote in to a Linux server (one of many on...
5,194
Posted By aachave1
Yeah, I think it may be a coincidence (file size)...
Yeah, I think it may be a coincidence (file size) due to my headers. And yes, the epoch is probably unnecessary, but I'm not that familiar with perl time manipulation. To remove the epoch conversion...
5,194
Posted By aachave1
Okay, but why does it only have issues when one...
Okay, but why does it only have issues when one file is larger than the other, but works fine the other way around? This is the case for both sets of code that you had. Any hints as to why?

Where...
5,194
Posted By aachave1
Thanks Stomp for all these options! This latest...
Thanks Stomp for all these options! This latest script above works with the proper matching of data, however, if file2 is larger than file1, The headers are opposite (file1 headers are with file2...
5,194
Posted By aachave1
I'm trying to remote to my work PC at the moment...
I'm trying to remote to my work PC at the moment and having connection issues.

As far as my files, I found out that it seems to work fine if file1 is smaller than file2, but if file1 is larger...
5,194
Posted By aachave1
Stomp, that seemed so close to working with two...
Stomp, that seemed so close to working with two of my "real" files, except it missed the very last match in the output file. For example, the file1 timestamp "16:31:20" matches the file2 "16:31:20"...
5,194
Posted By aachave1
"4 is closer to 5 than to 1. Is 1 nevertheless...
"4 is closer to 5 than to 1. Is 1 nevertheless the correct line for 4?"

Yes, 4 is closer to 5, but it has to be the nearest preceding file1 timestamp to file2's timestamp - not the timestamp...
5,194
Posted By aachave1
Here a simple example with pseudo file data where...
Here a simple example with pseudo file data where the column 1 is the virtual timestamp. file1 time is every 5 seconds and file2 time is every 1 second.

File1:

Header1
1
5
10
15
20
...
5,194
Posted By aachave1
Is this a specific scenario question, because my...
Is this a specific scenario question, because my examples are different?

But, if this were a real output from file1 and file2 of mine, it would look like this below after a proper sort/merge.
...
5,194
Posted By aachave1
"To say what I understood:" "The green part is...
"To say what I understood:"
"The green part is from File1 and the blue part is from File2." Yes, but also the headers are different because the file1 header (green also) has "G_" pre-pended to the...
5,194
Posted By aachave1
I'll try to simplify, but not sure if I can. ...
I'll try to simplify, but not sure if I can.

I have a file1 and file2 that have timestamped rows of data and headers. I need to use the data from file1 as metadata to precede file2 data when...
5,194
Posted By aachave1
Keep only the closet match of timestamped row (include headers) from file1 to precede file2 row/s
My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very...
2,051
Posted By aachave1
Yes, I understand. I am so sorry for the lack of...
Yes, I understand. I am so sorry for the lack of clarity, but it seemed difficult to explain since my files are huge and these are just little snippets.

Here are some more examples with files...
Showing results 1 to 25 of 29

 
All times are GMT -4. The time now is 09:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy