9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My files:
file1 and file2 contain 157 words.
Emptyfile1 contain 0 words.
My script has to output how many files is filled with words and how many that are not.
If there are files that have words in it. It has to output "file2 and file2 contains 157 words, 0 files are empty"
If not every... (9 Replies)
Discussion started by: johnrichards
9 Replies
2. Shell Programming and Scripting
I am in need of a basic format to
1. list all files in a directory
2. list the # of lines in each file
3. list the # of words in each file
If someone could give me a basic format i would appreicate it
***ALSO i can not use the FIND command*** (4 Replies)
Discussion started by: domdom110
4 Replies
3. UNIX for Dummies Questions & Answers
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies
4. Shell Programming and Scripting
Hi ,
i'm trying to count a particular word occurance in a whole directory..is this possible :wall:
say for example there is a directory with 100 files which and all the file may have the word 'aaa' in it ...how would i count the number of 'aaa' in those whole 100 files in a directory ?
... (10 Replies)
Discussion started by: Rabbitsfoot
10 Replies
5. Shell Programming and Scripting
Hi,
Now i work in a code that
1-get data stored in the database in the form of hash table with a key
field which is the " Name"
2-in the same time i open a txt file and loop through it word by word
3- which i have a problem in is that :
I need to loop word by word and check if it is a... (0 Replies)
Discussion started by: eng_shimaa
0 Replies
6. Shell Programming and Scripting
Hi all, I am trying to write a command that can help me count the number of lines in the /etc/passwd file ending in bash.
I have read through other threads but am yet to find one indicating how to locate a specifc word at the end of a line. I know i will need to use the wc command but when i... (8 Replies)
Discussion started by: warlock129
8 Replies
7. Shell Programming and Scripting
dear all,
i have a requirement to count the errors and display from a file.
eg. file1.txt
sjdgfjdgfgd ora-0001 sdjgfydh sdukgh7 23
sjdgfjdgfgd ora-0002 sdjgfydhsf34 ew 34v
sjdgfjdgfgd ora-0008 sdjgfydh asdf asdfas
sjdgfjdgfgd ora-0001 sdjgfydhjkbs ui873
sjdgfjdgfgd ora-0004 sdjgfydh... (9 Replies)
Discussion started by: unx100
9 Replies
8. UNIX for Dummies Questions & Answers
hi All,
I have one question to have a answer with your help.
i need to have a script for searching a file with .log extension form all directories. search for a word " Pass" in the files and to count the occurence of the word "Pass".
i need all your help to solve the problem.
Thanks,... (3 Replies)
Discussion started by: sipmohan
3 Replies
9. Shell Programming and Scripting
Greetings.
I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file.
I'm struggling to see how each line can be... (5 Replies)
Discussion started by: tricky
5 Replies