06-15-2019
As Scrutinizer posted, modifying the field separator is responsible, as it changes field numbering. $6 now assumes the values "C", "N", "O", "CA", "CB", whose count is 5.
10 More Discussions You Might Find Interesting
1. Web Development
Hi,
For example lets consider i have word like this:cell
I have some text that is stored in table.
These are few sentences.
TRAP also regulates translation of trpE by promoting formation of an cell.
In addition initiation of pabA, trpP and ycbK by directly blocking cells.
I... (0 Replies)
Discussion started by: vanitham
0 Replies
2. Shell Programming and Scripting
hi I hace a string
"abc,def,ghi,abc,def ,ghi,abc,def,ghi,abc,def ,ghi,abc"
i replaced commas with spaces, now i want to calculate nof occurences of "abc" word.
thanks in advance
Satya (6 Replies)
Discussion started by: Satyak
6 Replies
3. 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
4. Shell Programming and Scripting
I have enclosed the script. I am able to find the files that contain my search string but when I try to count the occurences within the file I get zero always. Any help on this.
#!/usr/bin/perl
my $find = $ARGV;
my $replace = $ARGV;
my $glob = $ARGV;
@filelist = <*$glob>;
# process each... (22 Replies)
Discussion started by: TimHortons
22 Replies
5. UNIX for Dummies Questions & Answers
I want to count the number of occurences of say "200" in a file but that file also contains various stuff including dtaes like 2007 or smtg like 200.1 so count i am getting by doing grep -c "word" file is wrong
Please help!!!!! (8 Replies)
Discussion started by: shikhakaul
8 Replies
6. Shell Programming and Scripting
Hi,
i am in need of an awk script to accomplish the following:
Input table looks like:
Student1 arts
Student2 science
Student3 arts
Student4 science
Student5 science
Student6 science
Student7 science
Student8 science
Student9 science
Student10 science
Student11 science... (8 Replies)
Discussion started by: saint2006
8 Replies
7. Shell Programming and Scripting
Hi,
Please help me in finding the number of occurences of the string.
Example: Apple, green, blue, Apple, Orange, green, blue are the strings can be even in the next line.
The o/p should look as:
Word Count
----- -----
Apple 2
green 2
Orange 1
blue 2
Thanks (2 Replies)
Discussion started by: acc888
2 Replies
8. UNIX for Dummies Questions & Answers
hi,
I have a text..and i need to find a pattern in the text and count to the no of times the pattern occured.
i have used grep command ..but the problem is , it shows the occurrences of the pattern but doesn't count no of times the pattern occuries. (5 Replies)
Discussion started by: nvnni
5 Replies
9. Shell Programming and Scripting
line number:status, market, keystation
1,SENT,EBS,1 : 1
2,DONE,REU,1 : 1
3,SENT,EBS,2 : 1
4,DONE,EBS,1 : 0
5,SENT,EBS,2 : 0
6,SENT,EBS,2 : 0
7,SENT,EBS,2 : 0
8,SENT,EBS,1 : 1
for each status, market combination I want to keep a tally of active orders. i.e if an order is SENT, then +1, if... (8 Replies)
Discussion started by: Calypso
8 Replies
10. Shell Programming and Scripting
I have some text files in a folder f1 with 10 columns. The first five columns of a file are shown below.
aab abb 263-455 263 455
aab abb 263-455 263 455
aab abb 263-455 263 455
bbb abb 26-455 26 455
bbb abb 26-455 26 455
bbb aka 264-266 264 266
bga bga 230-232 230 ... (10 Replies)
Discussion started by: gomez
10 Replies
ACTIVE(5) File Formats Manual ACTIVE(5)
NAME
active, active.times - list of active Usenet newsgroups
DESCRIPTION
The file /var/lib/news/active lists the newsgroups that the local site receives. Each newsgroup should be listed only once. Each line
specifies one group; their order in the file does not matter. Within each newsgroup, articles are assigned unique names, which are mono-
tonically increasing numbers.
If an article is posted to newsgroups not mentioned in this file, those newsgroups are ignored. If no valid newsgroups are specified, the
article is filed into the newsgroup ``junk'' and only propagated to sites that receive the ``junk'' newsgroup.
Each line consists of four fields specified by a space:
name himark lomark flags
The first field is the name of the newsgroup. The second field is the highest article number that has been used in that newsgroup. The
third field is the lowest article number in the group; this number is not guaranteed to be accurate, and should only be taken to be a hint.
Note that because of article cancellations, there may be gaps in the numbering sequence. If the lowest article number is greater then the
highest article number, then there are no articles in the newsgroup. In order to make it possible to update an entry in-place without
rewriting the entire file, the second and third fields are padded out with leading zeros to make them a fixed width.
The fourth field can contain one of the following flags:
y Local postings are allowed
n No local postings are allowed, only remote ones
m The group is moderated and all postings must be approved
j Articles in this group are not kept, but only passed on
x Articles cannot be posted to this newsgroup
=foo.bar Articles are locally filed into the ``foo.bar'' group
If a newsgroup has the ``j'' flag, then no articles will be filed into that newsgroup and local postings to that group should not be gener-
ated. If an article for such a newsgroup is received from a remote site, it will be filed into the ``junk'' newsgroup if it is not cross-
posted. This is different from not having a newsgroup listed in the file because sites can subscribe to ``j'' newsgroups and the article
will be propagated to them.
If the fourth field of a newsgroup starts with an equal sign, then the newsgroup is an alias. Articles can be posted to the group, but
will be treated as if they were posted to the group named after the equal sign. The second and third fields are ignored. Note that the
Newsgroup header is not modified (Alias groups are typically used during a transition, and are typically created with ctlinnd(8)). An
alias newsgroup should not point to another alias.
The file /var/lib/news/active.times provides a chronological record of when newsgroups are created. This file is normally updated by
innd(8) whenever a ctlinnd ``newgroup'' command is done. Each line consist of three fields:
name time creator
The first field is the name of the newsgroup. The second field is the time it was created, expressed as the number of seconds since the
epoch -- i.e., a time_t; see gettimeofday(2). The third field is the electronic mail address of the person who created the group.
HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.13, dated 1996/10/29.
SEE ALSO
ctlinnd(8), innd(8).
ACTIVE(5)