473,322 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Comparing and editing columns between two text files

Hi,

I have two text files, with coordinate data organized row by row (for each coordinate of a particle). The data looks like this, for one of the files:

1.9500, 1, 200000.0, 0.0700, 1.7901, 1.7901, 0.0000, 2.00
1, 82.000, -1.515, 233.262, 182.400,184.000, 1.000, 0.426, 0.274, 0.280
2, 87.000, 2.003, 247.324, 203.600,172.600, 1.000, 0.258, 0.081, 0.091
3, 85.500, 11.034, 111.973, 174.500,182.600, 1.000, 0.291, 0.181, 0.167

I need to extract the last column of each file (eg. 0.280, 0.091, 0.167 etc) and compare each row value with the corresponding row in the other file, find which is larger and put it into a new file. How can I do this?

Please help, as I need to find this ASAP for a research project.

Thanks.
Jul 28 '08 #1
2 1000
numberwhun
3,509 Expert Mod 2GB
Well, what have you tried thus far? If this is as urgent as you say, then I assume you have been coding and trying to perform this operation as you described.

Why not post your code here, enclosed in code tags, and we will help you.

If you haven't done any coding (which would surprise me considering your urgency), then I would suggest you look into using something like the split() function to get each line into an array and then grab the last element of each.

Regards,

Jeff
Jul 29 '08 #2
KevinADC
4,059 Expert 2GB
He posted on at least two forums. I gave him a suggestion on devshed but so far no response back wether it helped or not.

devshed
Jul 29 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Corno | last post by:
Hi all, Does anybody know a command line tool (linux or windows) that can compare 2 XML files. There's only 1 extra requirement that makes it a bit more complicated: the order of attributes or...
1
by: sam.collett | last post by:
Is there a basic guide on Xml document creation and editing (simpler than the MSDN docs). Say I want to create a file containing the following: <?xml version="1.0" encoding="utf-8"...
2
by: Martin Hazell | last post by:
For various reasons, I have had to produce a quick (!) page to edit one column of data in a database with ASP.net. With this being my first foray into ASP.net, I apoligise for any basic erros I have...
8
by: Sam Collett | last post by:
Is there a basic guide on Xml document creation and editing (simpler than the MSDN docs). Say I want to create a file containing the following: <?xml version="1.0" encoding="utf-8"...
1
by: AmitKu | last post by:
I've got the Gridview going at full speed, and I've enabled editing, but when I click on the "edit" button, this ugly editing UI comes up. Well it's not ugly, but it's not great either. How do I...
0
by: Frnak McKenney | last post by:
Can I use a bound ComboBox for both browsing and editing? I'm working on a small, standalone database application using Visual C#.NET 2003 and an Access data file. In order to keep the number...
0
by: hanusoft | last post by:
This is an example of editing in DataGrid and Default Paging http://www.hanusoftware.com Html Design Code : - <asp:DataGrid id="DataGrid1" DataKeyField="id" runat="server" Height="224px"...
3
by: erbrose | last post by:
Hello all! Newbie here, I've been tasked with a fairly intensive project here and my perl skills are still at a minimum so this post may eventually turn into a long one, but I am only going to ask...
0
by: Gabriel Genellina | last post by:
En Thu, 15 May 2008 06:02:29 -0300, Beema shafreen <beema.shafreen@gmail.comescribió: *three* columns? You menction only two of them. Do you have to syncrhonize both listings? That is,...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.