Editing my data file

  • Thread starter omegacore
  • Start date
  • #1
15
0

Main Question or Discussion Point

Hello!

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!
 

Answers and Replies

  • #2
mgb_phys
Science Advisor
Homework Helper
7,774
12
Look at awk (eg http://student.northpark.edu/pemente/awk/awk1line.txt [Broken]) it's a very simple language for text processing

Print column 1 - column 2 would be something like:
awk '{print $1-$2}' datafile.txt
 
Last edited by a moderator:

Related Threads for: Editing my data file

Replies
2
Views
813
Replies
5
Views
3K
Replies
7
Views
7K
Replies
4
Views
4K
Replies
3
Views
773
Replies
2
Views
9K
  • Last Post
Replies
3
Views
9K
  • Last Post
Replies
3
Views
7K
Top