10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to categorize and count the as below:
Input file:
A1 G1 C1 F1
A2 G1 C1 F1
A3 G1 C1 F2
A4 G1 C2 F2
A7 G1 C2 F2
A8 G1 C2 F3
A11 G1 C2 F3
A23 G1 C2 F3
B4 G1 C2 F3
AC4 G2 C3 F4
B6 G2 C4 F4
BB5 G2 C4 F4
A25 G2 C5 F4
B13 G2 C5 F5
D12 G2 C5 F5
D2 G2 C5 F5 (3 Replies)
Discussion started by: aydj
3 Replies
2. Shell Programming and Scripting
Im looking for an awk script that will take the unique values in column 5, then print and count the unique values in column 6.
CA001011500 11111 11111 -9999 201301 AAA
CA001012040 11111 11111 -9999 201301 AAA
CA001012573 11111 11111 -9999 201301 BBB
CA001012710 11111 11111 -9999 201301... (4 Replies)
Discussion started by: ncwxpanther
4 Replies
3. Shell Programming and Scripting
hi, does any one know how to compare a file1 with many files and have to count a number (i.e. 1) like the following ..Thanx in advance
input
file1 file2 file3 filen
1 1 1 1
1 1 1 1
1 1 1 1
0 1 1 1
1 0 0 0
1 0 0 0
0 0 0 0
1 0 1 0
output
instances in file1 only - 2
instances in... (3 Replies)
Discussion started by: quincyjones
3 Replies
4. Shell Programming and Scripting
Hi,
I have the following input in a file & need output as mentioned below(need counter of every occurance of field which is to be increased by 1).
Input:
919143110065
919143110065
919143110052
918648846132
919143110012
918648873782
919143110152
919143110152
919143110152... (2 Replies)
Discussion started by: siramitsharma
2 Replies
5. Shell Programming and Scripting
Hello All,
I got a requirement when I was working with a file. Say the file has unloads of data from a table in the form
1|121|asda|434|thesi|2012|05|24|
1|343|unit|09|best|2012|11|5|
I was put into a scenario where I need the field count in all the lines in that file. It was simply... (6 Replies)
Discussion started by: PikK45
6 Replies
6. Shell Programming and Scripting
I have a input.txt file which have 3 fields separate by a comma
place, os and timediff in seconds
tampa,win7, 2575
tampa,win7, 157619
tampa,win7, 3352
dallas,vista,604799
greenbay,winxp, 14400
greenbay,win7 , 518400
san jose,winxp, 228121
san jose,winxp, 70853
san jose,winxp, 193514... (5 Replies)
Discussion started by: sabercats
5 Replies
7. Shell Programming and Scripting
Hi my task is to show the percentage of files accessed in /home in one week.
I have got as far as displying the files, kind of. I am not sure how to format them into a list. I've tried using awk but hasn't worked yet.
any help would be fantastic.
this is what i have got so far
echo "The... (4 Replies)
Discussion started by: AngelFlesh
4 Replies
8. Shell Programming and Scripting
Hi,
I've a fixed width file where I need to count the number of patterns from each line between characters 1 to 15 . so can we sort them and get a count for each pattern on the file between 1 to 15 characters.
65795648617522383763831552 410828003265795648 6175223837... (5 Replies)
Discussion started by: rudoraj
5 Replies
9. Shell Programming and Scripting
hey everybody ..
I have a problem when I use this command to count the Max number by awk it give to me 99 while there are numbers bigger than 99
awk 'NR==0 { temp = $0 ;next}
{ if ( $0 >= temp ) { temp=$0 } }
END{ print "Maximum Number:"temp""}' file
thank you for your help... (9 Replies)
Discussion started by: halola85
9 Replies
10. Shell Programming and Scripting
suppose u have a file
AAG
AAG
GYG
HYH
GTG
AAG
AAG
HYH
GYG
HUH
JUJ
JUJ
AAG
so output shud have
AAG = 5
GYG=2
HYH=2
HUH=1JUJ=2 (3 Replies)
Discussion started by: cdfd123
3 Replies