Register to reply

Editing my data file

by omegacore
Tags: data editing, linux
Share this thread:
May6-09, 10:43 AM
P: 15

I am running ubuntu, I have a copy of open office excel, but I need to edit a tab space delimited text file with my data in it so I can use gnuplot to plot it.

The editing consists of subtracting one column of data from a file, from another column of data in another file. Each row corresponds to another row in another document... There are about 1000 rows so I cannot do this manually. My lab writeup is due in a few hours, this is the last step I need to complete for the analysis!

I know there is a way to write a quick and dirty program that will perform the operation, but my experience with such things is limited to date. So please! Help!
Phys.Org News Partner Science news on
'Smart material' chin strap harvests energy from chewing
King Richard III died painfully on battlefield
Capturing ancient Maya sites from both a rat's and a 'bat's eye view'
May6-09, 11:11 AM
Sci Advisor
HW Helper
P: 8,953
Look at awk (eg it's a very simple language for text processing

Print column 1 - column 2 would be something like:
awk '{print $1-$2}' datafile.txt

Register to reply

Related Discussions
MATLAB : how to get the data from a .fig file ? Math & Science Software 2
MATLAB Data file question Math & Science Software 3
Help Scanning File Data In C! Engineering, Comp Sci, & Technology Homework 1
Generating data file in matlab Math & Science Software 4
Make a Pdf file into an ordinary web file (html file)? Computing & Technology 3