Search Results

Search: Posts Made By: lego
3,379
Posted By lego
your code didn't work for me, but mine did. ...
your code didn't work for me, but mine did.

I don't understand your perl code :confused:

I created a sample file:
but your code didn't work, mine did. Remember that I need this output:
3,379
Posted By lego
solved! i did: let lc=1 while [ $lc -lt...
solved! i did:

let lc=1
while [ $lc -lt 100 ]; do
awk 'NR%100==lc' lc=$lc input >> output
let lc=$lc+1
done
3,379
Posted By lego
another question (I hope my last one): I...
another question (I hope my last one):

I have a file like this:


where zn is some number.
but I need it in the following order:


I hope I have explained clearly
3,379
Posted By lego
thanks! really useful!
thanks! really useful!
3,379
Posted By lego
And what can I do if the file is like this one? ...
And what can I do if the file is like this one?



i.e:


I need the output in a single column without empty lines, I tried with the scripts you suggested me something goes wrong.

I need...
4,098
Posted By lego
Yes frans, your script worked for me for any...
Yes frans, your script worked for me for any number of rows in x-values and y-values (provided np=nx*ny).

Thank you so much!
2,537
Posted By lego
I finally got the solution! After googling a...
I finally got the solution!
After googling a lot and with your help, I solved my problem.

I attach here ("phoenics2gnuplot.txt") the solution. An example input file is like the file ("data.txt")...
4,098
Posted By lego
Yes, the script by Franklin works with any number...
Yes, the script by Franklin works with any number of lines in x (lets say, nx) and y (lets say ny). The number of lines in p (np) has to be np=nx*ny. But this is how I stated the problem..

so it's...
4,098
Posted By lego
Thank you drewk. The code posted by Franklin52...
Thank you drewk. The code posted by Franklin52 also does the job.
3,379
Posted By lego
It worked perfectly. Thanks Franklin52!
It worked perfectly.
Thanks Franklin52!
3,379
Posted By lego
ordering a data file
With an input file like this:
How can I get an output like this?

(In the quoted examples, the "_" sign represents an empty space)

Note that there are some minus signs and no spaces, in the...
4,098
Posted By lego
You're right, and now your script is working like...
You're right, and now your script is working like a charm :-)
Tahnk you so much!!
4,098
Posted By lego
The code suggested by Franklin52 worked fine,...
The code suggested by Franklin52 worked fine, although it prints 4 lines more. This is the output that I got:
x1 y1 p1
x1 y2 p2
x1 y3 p3
x1 y4 p4
x2 y1 p5
x2 y2 p6
x2 y3 p7
x2 y4 p8
x3 y1 p9...
4,098
Posted By lego
No, the files doesn't have the same number of...
No, the files doesn't have the same number of records (in my example, X has 3 values, Y has 4, and P has 12), and the code you suggested me didn't work, because it merge each line of each file, and...
4,098
Posted By lego
Merge 3 files in 1 file in an ordered way
Hi, I have a question that I cannot solve.
if I have a file like this (lets say "x-values.dat"):
x1
x2
x3
another file like this (lets say "y-values.dat"):
y1
y2
y3
y4
and another file like...
2,537
Posted By lego
Can someone help me please?
Can someone help me please?
2,537
Posted By lego
Thanks for your replies, but I couldn't get it to...
Thanks for your replies, but I couldn't get it to work with my file..
I attach here the file I need to work with (data.txt), and I'll try to explain what I exactly want.
I have a file which has...
2,537
Posted By lego
formatting data file with awk or sed
Hi,

I have a (quite large) data file which looks like:
_____________
header part..
more header part..
x1 x2 x3 x4 x5 x6
x7 x8 x9 x10 x11 x12
x13 ...
... x59 x60
y1 y2 y3 y4...
... y100...
Showing results 1 to 18 of 18

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