10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm pretty new to scripting and didn't see an example of this issue yet. I am trying to count and print the total number of times each value is found within a file. Here is a short example of my starting file.
value 3
value 3
value 3
value 3
value 4
value 6
value 6
value 6
value 6... (3 Replies)
Discussion started by: funkynmr
3 Replies
2. Shell Programming and Scripting
Hi guys!
I have a problem writing script that would convert this input
into this output:
I have an awk script that counts occurences of a sign in a column, but don't know how to change it so that I would give me desired output.
script
awk '{count++}END{for(j in count)... (2 Replies)
Discussion started by: grincz
2 Replies
3. Shell Programming and Scripting
Hi,
I need a shell script which can provide details from error logs like this
Aug 23 21:19:41 red mountd: authenticated mount request from bl0110.bang.m
pc.local:651 for /disk1/jobs (/disk1)
Aug 23 08:49:52 red dhcpd: DHCPDISCOVER from 00:25:90:2b:cd:7c via eth0: unknown client
Aug 24... (2 Replies)
Discussion started by: ratheeshp
2 Replies
4. Shell Programming and Scripting
Hi,
I am trying to count the max number of occurences of field1 in my apache log
example:
10.0.0.1 field2 field3
10.0.0.2 filed2 field3
10.0.0.1 field2 field3
10.0.0.1 field2 field3
awk result to print out only the most occurence of field1 and number of occurence
and field1 is... (3 Replies)
Discussion started by: phamp008
3 Replies
5. Shell Programming and Scripting
say i've got a text file with >10million sequences:
ssss
ssss
tttttt
uuuuuu
uuuuuu
uuuuuu
...
I'd like to convert the file so that the output will report the number of occurence right by each sequence:
2 ssss
2 ssss
1 tttttt
3 uuuuuu
3 uuuuuu
3 uuuuuu
.... (3 Replies)
Discussion started by: johjoh
3 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I want to count the occurences of a specific word in a .txt file in bash shell.
Can somebody help me pleaze??
Thanks!!! (2 Replies)
Discussion started by: mskart
2 Replies
7. Shell Programming and Scripting
Hi,
I've been trying to create a perl file to run something very specific. But I'm not getting any success. I'm not very good with hashing.
I have a file with two columns (tab separated) (already sorted)
99890 +
100281 +
104919 -
109672 +
113428 -
114501 +
115357 +
115598 ... (7 Replies)
Discussion started by: labrazil
7 Replies
8. HP-UX
For counting the occurences of specific character in the file
I am issuing the command
grep -o 'character' filename | wc -w
It works in other shells but not in HP-UX as there is no option -o for grep.
What do I do now? (9 Replies)
Discussion started by: superprogrammer
9 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I have to count the number of occurences of the character " ; " in a given line.
I had used the following awk command to achieve the same
echo $KOP.dat|awk '{split($1,my,";"); for(i in my)c++ }END{print c-1}'
My file KOP.dat had the following data
... (1 Reply)
Discussion started by: kingofprussia
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
i'd like to know if the following is possible with a shell script, and can't find the answer in the search.
Suppose i have a logfile build like this:
# 8 :riuyzp1028
# 38 : riuyzp1028
# 25 : riuyvzp1032
# 30 : nlkljpa0202
# 1 : nlklja0205
# 38 : riuyzp1028
# 25 :... (4 Replies)
Discussion started by: Freerider
4 Replies