Search Results

Search: Posts Made By: bjorb
6,536
Posted By bjorb
This is for Ygor
Hi Ygor!
Could you please explain the awk code for extracting last line in the record?
I tried to use the code on records containing only two fields, but then it only printed the last line from the...
4,228
Posted By bjorb
huh, no sweat! Incredible how easy something...
huh, no sweat!

Incredible how easy something can turn out to be.
I feel embarrassed to have posted this thread, but posted is posted.....
Thanks alot Perderabo!

regards
bjorb
4,228
Posted By bjorb
How to add fields in a file
Hi all!

I have two files containing one field each.
The fields consist of numbers separated in records e.g.

file1.dat

1657
2345
5678
5676
7978

7856
5686
5676
8990
.
.
.
6,536
Posted By bjorb
Thanks Ygor. When it comes to the first...
Thanks Ygor.
When it comes to the first question (partly) I used ruby code (provided by futurelet on a previous question) to sort each record with respect to the z-value, resulting in the largest...
6,536
Posted By bjorb
how to extract last line in record
Hi all!!

I have a file containing records e.g. file.dat below.
Now I want to extract the last line from each record and insert this
into a new file, filenew.dat

file.dat
1 3 5
2 4 6
1 6...
6,536
Posted By bjorb
Thanks for the link. But to be honest I'm not...
Thanks for the link.
But to be honest I'm not to familiar with awk myself.
Is there a way to pick a max value from a field using awk?

Could grep be used?

bjorb
6,536
Posted By bjorb
extract specific data from file and insert into new file.
Hi all!!

After experiencing great helpfulness the last time I posted a problem at this site, I once again turn to the forum for expert help.

The problem:

I have a file.dat containing x, y,...
6,718
Posted By bjorb
When a problem can be solved so elegantly with...
When a problem can be solved so elegantly with your code solution, I would be stupid not to use it :) . Once again, thanks futurelet! I must admit, I do not understand the code presented but I will...
6,718
Posted By bjorb
It worked!! but... there is always a but.
The code worked just fine! Thanks, you are a life-saver!! But then another problem occured. After redirecting the sorted data into a new file "datanew.dat", it was to be plotted using gnuplot....
6,718
Posted By bjorb
simplified needs
After reviewing my needs I have realized that it would be sufficient to sort the data only considering the column with the y-coordinates:

From
100.000 23.000 150.000
99.000 83.000 369.000...
6,718
Posted By bjorb
I'm too lazy
Hehe!
First of all I want to give my appreciation for a quick answer.

Without knowing what the heck that code from Ygor meant I tested it in my script. It seemed to work partially in my case,...
6,718
Posted By bjorb
sort data
Hi!
I'm trying to sort a file.dat with the sort command. The data contained by file.dat is similar to the data set below:

100.000
99.000
110.000

55.000
113.000
33.000

25.000
9.000...
Showing results 1 to 12 of 12

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