10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
Please can you help how do I count the number of specific characters or words that appear in a file? (8 Replies)
Discussion started by: fretagi
8 Replies
2. Shell Programming and Scripting
Hi All!
I would like to have a script that will count the number of files at the top of the hour of soome directories and mail the results to me.
I was thinking on :
a=`/directory/subdirectory/ | wc -l`
echo "/directory/subdirectory :$a"
b=`/another_dir/subdir/ | wc -l`
echo... (12 Replies)
Discussion started by: fretagi
12 Replies
3. UNIX for Advanced & Expert Users
Hi,
I need help regarding counting specific word or character per line and validate it against a specific number i.e 10. And if number of character equals the specific number then that line will be part of the output.
Specific number = 6
Specific word or char = ||
Sample data:... (1 Reply)
Discussion started by: janzper
1 Replies
4. UNIX for Dummies Questions & Answers
Hey all,
I'm looking for a command that will search a directory (and all subdirectories) and give me a file count for the number of files that contain specific characters within its filename. e.g. I want to find the number of files that contain "-a.jpg" in their name.
All the searching I've... (6 Replies)
Discussion started by: murphysm
6 Replies
5. Shell Programming and Scripting
I am a newbie in UNIX shell script and seeking help on this UNIX function. Please give me a hand. Thanks.
I have a large file. Named as 'MyFile'. It was tab-delmited. I am told to write a shell function that counts the number of occurrences of the ord “mysring” in the file 'MyFile'. (1 Reply)
Discussion started by: duke0001
1 Replies
6. 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
7. Shell Programming and Scripting
hello everyone,
I'm trying to learn some scripts but i cant get my head around two of them.
1. how can i write a script that will count the number of times a particular word is used in file?
2. how can i make a script that will take me to a web page from unix?
if anyone could help it... (3 Replies)
Discussion started by: BigTool4u2
3 Replies
8. Shell Programming and Scripting
Hi all
Can anybody suggest me, how to get the count of digits in a word
I tried
WORD=abcd1234
echo $WORD | grep -oE ] | wc -l
4
It works in bash command line, but not in scripts :mad: (12 Replies)
Discussion started by: ./hari.sh
12 Replies
9. 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
10. Shell Programming and Scripting
Hello my friends, I need to count how many words are into a log file, I'm using:
cat logfile | grep 'word' | wc -l
Cuz the 'word' appears once per line.
But my logfile grow faster and at the end ofthe day is really big, so how i can count the 'word' only from (by example) line 4000 of... (5 Replies)
Discussion started by: lestat_ecuador
5 Replies