Not sure how to reconcile your written spec and the sampe output. Do you mean you want to insert a field by copying tolower($1) between $1 and $2? And, the count info should be the number of lines between <s> and </s>?
---------- Post updated at 13:08 ---------- Previous update was at 12:57 ----------
Assuming above thoughts to be true, try
This solution words great for ascii characters. However, I have some characters that are non-ascii and they do not convert correctly when using
. For instance, this is what happened:
Is there a way to maintain the non-ascii character when using
?
Hello. Im just starting to learn awk so hang in there with me...I have a large text file formatted as such everything is in a single column
ID001
value 1
value 2
value....n
ID002
value 1
value 2
value... n
I want to be able to calculate the average for values for each ID from the... (18 Replies)
Dear Guyz:)
I have 2 different input files like this. I would like to pick the values or letters from the inputfile2 based on inputfile1 keys (A,F,N,X,Z).
I have done similar task by using awk but in that case the inputfiles are similar like in inputfile2 (all keys in 1st column and values in... (16 Replies)
Hi Experts,
The content of the raw file:
date,nomsgsent,nomsgnotdeliver,nomsgdelay
201003251000,1000,1,2
201003251000,900,0,0
201003251000,1450,0,0
201003251000,1230,0,0
However, sometimes, the column will missing in the raw files:
e.g.
date,nomsgsent,nomsgdelay... (8 Replies)
Hello,
I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2
SDF4 -0.211654
SDF4 0.978068
... (1 Reply)
please help!!!!!!
I have a file .txt that has only one column like that:
34.1
35.5
35.6
45.6
...
Now, i want to add a column in the left in which the values of this column increase by 0.4 , for example:
0.0 34.1
0.4 35.5
0.8 35.6
1.2 45.6
How can i do with awk instructions??? ... (2 Replies)
Hi all !
If there is only one single value in a column (e.g. column 1 below), then return this value in the same output column.
If there are several values in the same column (e.g. column 2 below), then return the different values separated by "," in the output.
pipe-separated input:
... (11 Replies)
Hello,
I have a table as shown below. I want to concatenate values in col2 and col3 based on a value in col4.
1 X Y A
3 Y Z B
4 A W B
5 T W A
If col4 is A, then I want to concatenate col3 with itself. Otherwise it should concateneate col2 with col3.
1 X Y YY
3 Y Z YZ... (10 Replies)
Hi,
My input files is like this
axis1 0 1 10
axis2 0 1 5
axis1 1 2 -4
axis2 2 3 -3
axis1 3 4 5
axis2 3 4 -1
axis1 4 5 -6
axis2 4 5 1
Now, these are my following tasks
1. Print a first column for every two rows that has the same value followed by a string.
2. Match on the... (3 Replies)
Please help me to get required output for both scenario 1 and scenario 2 and need separate code for both scenario 1 and scenario 2
Scenario 1
i need to do below changes only when column1 is CR and column3 has duplicates rows/values. This inputfile can contain 100 of this duplicated rows of... (1 Reply)