Search Results

Search: Posts Made By: Jae
3,042
Posted By Jae
here is the code
Here is the code from notepad++.
Windows-based editor create a problem?

file2.txt

101 606 20. 15. 1. 1. 0.1 0.12 0.
101 606 1.2. ...
3,042
Posted By Jae
syntax error
Hi quirkasaurus,

Your code is also attractive and looks fine. But, I don't know why I got error message at the end of file.
"./file.sh: line 35: syntax error: unexpected end of file"

Any...
3,042
Posted By Jae
How to loop in getline from files
Hi Franklin,

Thanks to you, I am almost got the solution, but I don't know how to loop in getline from two files. Only first line from file2.txt and file3.txt is updated in file.conf. For next...
3,042
Posted By Jae
Replace whole lines in the file from different files
Hi all,
I have two parameter blocks in a configuration file, file1.conf.
First parameter block starts with PWAT-PARM1 and
ends with END PWAT-PARM1.

Second parameter block starts with...
29,269
Posted By Jae
Looks simple, but..
Thanks Era,

Your approach looks simple, but not quite right. Shamrock's method below looks long, but it gives me a right answer.
29,269
Posted By Jae
Replace one digit by two digit using sed
Folks,

Is there a simple way to replace one digit by two digit using sed.

Example,
mydigit1918_2006_8_8_lag1.csv should be
mydigit1918_2006_08_08_lag01.csv.

I tried this way, but...
4,732
Posted By Jae
Problem was solved.
cat st15.txt|while read line; do cp $(printf "[QX]%s.DAT" $line) ./dest;done


Thanks all!!
4,732
Posted By Jae
match string in a file to file in a directory
Hello awk gurus,

I have a text file (st15.txt) containing many station ids.
st15.txt:
033445
234567
012345
222345
.
.
.
And, I want to match each station number to individual files in a...
4,504
Posted By Jae
Here is the solution
FYI,
Based on previous scripts, I revised a little bit to make it work.
Again, thanks summer_cherry and Franklin.


awk 'BEGIN{format="%s-%02dz %12.6f"; n=0}
{
temp=substr($1,12,2)...
4,504
Posted By Jae
It is closer but not right.
Thanks summer_cherry;
It is very closer, but I am not able to get the right answer using your script, either. Two time steps are missing in the output.
1987-01-01-22Z and 1987-01-01-23Z.
I think...
4,504
Posted By Jae
Thanks Franklin, I almost got it. but,...
Thanks Franklin,

I almost got it.
but, the result after 1987-01-01-21Z using your script is not what I want (look at the hour increment).
These are:
1987-01-01-21Z 94.1887
1987-01-02-01Z...
4,504
Posted By Jae
Thanks Franklin, I almost got it. but,...
Thanks Franklin,

I almost got it.
but, the result after 1987-01-01-21Z using your script is not what I want (look at the hour increment).
These are:
1987-01-01-21Z 94.1887
1987-01-02-01Z...
4,504
Posted By Jae
Not easy to me at all
Yes, I know awk would be the solution. But, my trial doesn't work.
Any input would be appreciated. I am noting to do with Devry.

awk '
BEGIN {
FS="-|" "";
}
...
4,504
Posted By Jae
Insert rows with computations of next row
Hello folks,
I have data collected in every 3 hours. But, I would like to expand this to 1 hour interval by equally dividing with next row.
For example, I want to keep the first value...
1,722
Posted By Jae
files cross over
I have many files (File 1, File 2, File 3, ...) in same directory.
The format of all these files are same.
What I would like to do is to combine all these files into a single file via cross over....
18,958
Posted By Jae
Replace blank spaces by single tab, and right alignment
Folks, I am wondering if anyone solve this problem.
What I want to know is,
1. Delete all white spaces including leading blank space in each line (e.g. line 2), and replace such spaces by single...
4,279
Posted By Jae
sweet!! Thanks Shell_life.
sweet!!
Thanks Shell_life.
4,279
Posted By Jae
Column wide file binding
What is the best way to bind files in column wide?
Looks a simple, but I don't know the most economic way.
I tried to merge, and cat function, but not success!!

Ex.)
file 1
1 2 3
2 3 4
...
2,976
Posted By Jae
Let me try to clarify. Input file has many...
Let me try to clarify.
Input file has many lines.
7.23 7.32 5.21 10.13 5.06 5.06 0.2381 0.7772 0.6152
41.28 45.18 48.37 51.92 33.41 33.9918.913418.9570 1.1610
6.53 7.44 8.22 9.14 5.06 5.06...
2,976
Posted By Jae
Quote: 41.28 45.18 48.37 51.92 33.41...
Quote:
41.28 45.18 48.37 51.92 33.41 33.9918.913418.9570 1.1610

The original format looks above no space between 33.99,18.9134, and 18.9570. That is the problem.
My goal is to add "space"...
2,976
Posted By Jae
Adding blank white sapce at specific column
I have a file looking like this. But, if you look at second line, the number are stick together(e.g. 33.9918.913418.9570). What I want to do is to separate these number by white space. I tried to use...
4,406
Posted By Jae
Resolved, but looks dirty
Thank you for code, matrixmadhan and Shell_life.
But, I simply do that, looks dirty though.
head -1 filename > filename1.csv
awk -F", " '{ if ( $5 >= -300 && $5 <= 300 ) { print } }' filename >>...
4,406
Posted By Jae
But, header row was removed
Thank you for code, matrixmadhan.
But, header row was removed.
I want to keep header row, so the result should be.

ex1e, ex2g, ex39, pasg, ssg, mrlc, pc, kb, coop
-112, -53, -177, 64, 62, 71,...
4,406
Posted By Jae
sed csv remove conditionally
Hello,
I have many csv file, but I would like to delete lines with some values in a column conditionally.

My example look like this,

ex1e, ex2g, ex39, pasg, ssg, mrlc, pc, kb, coop...
Showing results 1 to 24 of 24

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