9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a data sample as shown below. I want to fill in the left column so that the line will be continuous. For example, between 1 and 5 should be 2,3,4. And corresponding values in the right column will be 0. Thus the expected data should look like that:
1 1
1 10
1 2
1 3
1 5
1 6
2 0... (6 Replies)
Discussion started by: theanh0508
6 Replies
2. UNIX for Beginners Questions & Answers
I have a time series data like this
40754,35.6931,51.3092,201610160700,21.0
40754,35.6931,51.3092,201610160800,23.0
40754,35.6931,51.3092,201610160900,24.0
40754,35.6931,51.3092,201610161000,24.0
40754,35.6931,51.3092,201610161300,25.0
40754,35.6931,51.3092,201610161400,23.0... (6 Replies)
Discussion started by: emirzaei
6 Replies
3. Shell Programming and Scripting
Hello,
I have two files of same structure except some rows are missing randomly in each file. How do I fill the missing rows to have the exact ID column (S01 ~ S96) and rest columns filled with "0" with awk? The purpose of this step is to join the two files side by side. The closest thread is... (17 Replies)
Discussion started by: yifangt
17 Replies
4. Shell Programming and Scripting
hello everyone,
I have a task to input missing data into a file. example of my data below:
Wed Feb 01 09:00:02 EST 2012,,,0.4,0.3,,0.3,,0.3,,0.5,,0.3,,,0.4,0.3,
Wed Feb 01 09:00:11 EST 2012,,,,,,,0.2,,,,,,,,,,
Wed Feb 01 09:00:22 EST... (23 Replies)
Discussion started by: Nolph
23 Replies
5. Shell Programming and Scripting
Hi All,
I have 100 .txt files which look like this:
3
4
5
6
7
Now, some files have some numbers missing in them and they look like this:
4
5
6 (6 Replies)
Discussion started by: shoaibjameel123
6 Replies
6. Shell Programming and Scripting
Hi All,
I have 100 files with names like this:
1.dat, 2.dat, 3.dat until 100.dat.
My dat files look like this:
42323 0
438939 1
434 0
0.9383
3434
120.23 3
234
As you can see in the second column, some numbers are missing. I want to fill those missing places with 0's in all... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies
7. Shell Programming and Scripting
Hi,
I'm working on a script that will take the contents of a file, that is in a row and column format, and compare it to a arrangment file. Such that if there is any or all blanks in my content file, the blank will be filled with a flag and will retain the row and column configuration.
Ex.
... (2 Replies)
Discussion started by: hizzle
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I've got a file with several columns where some entries are missing.
Example:
a b c d
f g h
j k l
p y r
I need to replace the empty spaces with zero, so the new file would be:
a b c d
f 0 g h
j k 0 l
p y 0 r
The original file is tab delimited.
Many thansk for... (3 Replies)
Discussion started by: zajtat
3 Replies
9. Shell Programming and Scripting
I need to edit a list of numbers on the following form:
1 1.0
2 1.4
5 2.1
7 1.9
I want:
1 1.0
2 1.4
3 0.0
4 0.0
5 2.1
6 0.0
7 1.9
(i want to add the missing number in column 1 together with 0.0 in column 2).
I guess it is rather trivial but i didn't even manage to read column... (5 Replies)
Discussion started by: bistru
5 Replies