10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
Please bear with me, i need help
I am learning AWk and stuck up in one issue.
First point : I want to sum up column value for column 7, 9, 11,13 and column15 if rows in column 5 are duplicates.No action to be taken for rows where value in column 5 is unique.
Second point : For... (1 Reply)
Discussion started by: as7951
1 Replies
2. Shell Programming and Scripting
I have a file (let say file B) like this:
File B:
A1 3 5
A1 7 9
A2 2 5
A3 1 3
The first column defines a filename and the other two define a range in that specific file. In the same directory, I have also three more files (File A1, A2 and A3). Here is 10 sample lines... (3 Replies)
Discussion started by: Bastami
3 Replies
3. Shell Programming and Scripting
Hi,
I have a similar input format-
A_1 2
B_0 4
A_1 1
B_2 5
A_4 1
and looking to print in this output format with headers. can you suggest in awk?awk because i am doing some pattern matching from parent file to print column 1 of my input using awk already.Thanks!
letter number_of_letters... (5 Replies)
Discussion started by: prashob123
5 Replies
4. Shell Programming and Scripting
Hi,
I am using the following code to find the sum of the values of column 286 in a file. It will have the Decimal values with the scale of 2. Delimiter is '|^'
cut -d'|^' -f286 filename|cut -c3-| awk '{ x += $1 } END { printf("%.2f\n", x) }'
There are around 50k records in this file... (2 Replies)
Discussion started by: Jram
2 Replies
5. Shell Programming and Scripting
Hi Experts, I am trying to sum multiple columns and rows with awk ,
I want the sum of :
1] Horizontal Sum: (rows sum):
2] Vertical Sum: (Column's sum]
details:
# cat file1
10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25 26 27 28 29
40 31 32 33 34 35 36 37 38 39
70 41 42 43 44... (2 Replies)
Discussion started by: rveri
2 Replies
6. Shell Programming and Scripting
Hi All,
I am another biologist attempting to parse a large txt file containing several million lines like:
tucosnp 56762 T Y 228 228 60 23 .CcCcc,,..c.c,cc,,.C...
What I need to do is get the frequency of periods (.) plus commas (,) in column 9, and populate this number into another... (1 Reply)
Discussion started by: peromhc
1 Replies
7. Shell Programming and Scripting
I have some data that is something like this?
item: onhand counted location
ITEM0001 1 0 a1
ITEM0001 0 1 a2
ITEM0002 5 0 b5
ITEM0002 0 6 c1
I want to sum up... (6 Replies)
Discussion started by: syadnom
6 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I am trying to add a column that contains the sum of the previous column repeated. IE
1
2
3
4
I would like to get:
1 10
2 10
3 10
4 10
Advice? I can get
1 1
2 3
3 6 (4 Replies)
Discussion started by: baconbasher
4 Replies
9. Shell Programming and Scripting
hi all,
I generally give an awk command to print multiple columns like this:
awk -F~ '{OFS=",";print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13}' test.txt
can't we give a range like :
awk -F~ '{OFS=",";print $1-$13}'
( I know this will subtract column 13 from 1)
or awk -F~... (1 Reply)
Discussion started by: sumeet
1 Replies
10. Shell Programming and Scripting
:confused: Hi i am a noob and need a little help to finish my shell script. I am learning as i go but hit a problem.
I am search thorugh logs(*.rv) files to find entires between two user defined dates,
The script so far looks for the "START" and "END" of each entry at sees if it belongs To... (0 Replies)
Discussion started by: mojo24
0 Replies