03-20-2013
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm attempting to create a Perl script that will:
Take the contents of the usernames.tmp file
(usernames.tmp is created from an awk one-liner ran against /etc/passwd)
Take one line at a time and pass it to the su command as a users name.
This should go on until there is no more name to... (10 Replies)
Discussion started by: bru
10 Replies
2. Linux
Hi All,
I have a quary regarding grep command in linux.
I have a file which contains
56677
56677
+56677
+56677
56677
56677
56677
I want to extract total count of "56677"
When I hit the following command
#cat filename | grep -w -c '56677'
the result comes 7. Its counting... (3 Replies)
Discussion started by: maddy
3 Replies
3. UNIX for Dummies Questions & Answers
In a file I have to count a particular word. like i need apache how many times.
I tried this
$ tr "\011" "\012\012"<foo1 | tr -cd "" |sort\uniq -c
but I got result like this
32 apache
18 dns
12 doctor
Please sugest me (4 Replies)
Discussion started by: pranabrana
4 Replies
4. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
It was the best of times, it was the worst of times,
It was the age of wisdom, it was the age of foolishness,
It was the epoch of belief, it was the epoch of incredulity,
It was the season of Light, it was the season of Darkness,
It... (3 Replies)
Discussion started by: bigubosu
3 Replies
5. Shell Programming and Scripting
Hello,
I try to insert a post because I've got a trouble to perform a unix job. But I didn't found which steps (procedure) I should follow. Could you help me?
I got a log by my Application box, like following:
gbosmam037:test >view Log_Server.csv
... (2 Replies)
Discussion started by: maluca68
2 Replies
6. Shell Programming and Scripting
Hello All,
I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer.
Any ideas would be appreciated! (5 Replies)
Discussion started by: pnara2
5 Replies
7. UNIX for Dummies Questions & Answers
Hi all, I have to do a script bash (for university) that counts all word occurrences in a specific web page.
anyone can help me?. Thanks :) (1 Reply)
Discussion started by: piacentero
1 Replies
8. Shell Programming and Scripting
Hi everyone,
I'm a perl newbie and need your help to extract a word inside the list of files with same pattern.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:mycode xmlns:ns2="http://www.abcd.com/pqrs/acfSchema-2007a.xsd">
<id>10</id>
<name>PaymentServices</name>
... (7 Replies)
Discussion started by: jhamaks
7 Replies
9. UNIX for Dummies Questions & Answers
Hi!!
I am trying to write a program which allows me to count how many times I used the same word in a text:
{$0 = tolower ($0)
gsub (/_]/, "", $0)
for (i = 1; i <= NF; i++)
freq++
}
END {
for (word in freq)
printf "%s\t%d\n", word, freq
It seems work but... (3 Replies)
Discussion started by: ettore8888
3 Replies
10. UNIX for Dummies Questions & Answers
How do you write a script that counts the number of times a word appears in a file and output it?
Original:
ID1 SMARCB1;Adil;Jon
ID2 Jon;Annie;Mei
ID3 Adil;Spaghetti;NBA
ID4 Raptors;wethenorth;SMARCB1
ID5 SMARCB1;wethenorth
Objective:
SMARCB1: 3
Adil: 2
Jon: 2... (5 Replies)
Discussion started by: Lipidil
5 Replies