Sponsored Content
Full Discussion: how to find number of words
Top Forums Shell Programming and Scripting how to find number of words Post 302337785 by annapurna konga on Saturday 25th of July 2009 07:47:10 AM
Old 07-25-2009
how to find number of words

please
help me for this
"divide the file into multiple files containing no more than 50 lines each and find the number of words of length less than 5 characters"

Last edited by annapurna konga; 07-25-2009 at 09:08 AM..
 

10 More Discussions You Might Find Interesting

1. Programming

how i display number in words

helo i want to implement the following concept in my project write a c/c++ algorithm for : accept a number from the user not greater than 6 digits and display the number in words i.e. if the input from the user is 18265 then the output should be Eighteen Thousand Two Hundred Sixty Five. if the... (3 Replies)
Discussion started by: amitpansuria
3 Replies

2. Shell Programming and Scripting

counts the number of distinct words

I'm looking to write a sample shell script that counts the number of distinct words in a text file given as Argument. Remark: White space characters are spaces, tabs, form feeds, and new lines. JUST with this commands tr, sort, grep. wc. Thanks. (14 Replies)
Discussion started by: Net-Man
14 Replies

3. UNIX for Dummies Questions & Answers

number of words in delimited string

Hi, I'm looking for one liner code for counting number of words in a delimited string.. I know about wc -w ..but if i give wc -w a.txt,b.txt it won't work with delimited sting as it was looking for files with a.txt and b.txt I know there will be a simple solution..i couldn't... (5 Replies)
Discussion started by: ammu
5 Replies

4. Shell Programming and Scripting

Split file by number of words

Dear all I am trying to divide a file using the number of words as a condition. Alternatively, I would at least like to be able to retrieve the first x words of a given file. Any tips? Thanks in advance. (7 Replies)
Discussion started by: aavv
7 Replies

5. Shell Programming and Scripting

Shell script to find out words, replace them and count words

hello, i 'd like your help about a bash script which: 1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel, 2.finds the link which leads to the download location of the Latest Stable Kernel version, (the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies

6. Shell Programming and Scripting

print number of words in each line

Hi, Please suggest a way to print number of words in the end of each line. <input file> red aunt house blue sky bat and ball game <output file> red aunt house 3 blue sky 2 bat and ball game 4 Thanks! (2 Replies)
Discussion started by: mira
2 Replies

7. Shell Programming and Scripting

Count number of match words

Input: some random text SELECT TABLE1 some more random text some random text SELECT TABLE2 some more random text some random text SELECT TABLE3 some more random text some random text SELECT TABLE1 some more random text Output: 'SELECT TABLE1' 2 'SELECT TABLE2' 1 'SELECT TABLE3' 1 I... (5 Replies)
Discussion started by: chitech
5 Replies

8. Shell Programming and Scripting

How can I sort by n number is like words?

I want to sort a file with a list of words, in order of most occuring words to least occurring words as well as alphabetically. ex: file1: cat 3 cat 7 cat 1 dog 3 dog 5 dog 9 dog 1 ape 4 ape 2 I want the outcome to be: file1.sorted: dog 1 (12 Replies)
Discussion started by: castrojc
12 Replies

9. Shell Programming and Scripting

How to count words number for each paragraph?

Hi, I have file like this: >number1 dlejreoreltedgerere dgtrtryr >number2 dkfdjlgdjfeiflefjdfidlfjdifelfjefe fjdlfjdkfjdlfdjlfdjlfjdigeo gjelreoureofouererg >number4 dklfdjfoeueoruer fjeorueotueoirueorueorueore gjoeoueorueoreuroerueor joeuroerueorue How can i know how many words... (4 Replies)
Discussion started by: the_simpsons
4 Replies

10. Shell Programming and Scripting

How count the number of two words associated with the two words occurring in the file?

Hi , I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Discussion started by: jmarx
1 Replies
LOOK(1) 						    BSD General Commands Manual 						   LOOK(1)

NAME
look -- display lines beginning with a given string SYNOPSIS
look [-df] [-t termchar] string [file ...] DESCRIPTION
The look utility displays any lines in file which contain string as a prefix. As look performs a binary search, the lines in file must be sorted. If file is not specified, the file /usr/share/dict/words is used, only alphanumeric characters are compared and the case of alphabetic char- acters is ignored. Options: -d Dictionary character set and order, i.e. only alphanumeric characters are compared. -f Ignore the case of alphabetic characters. -t Specify a string termination character, i.e. only the characters in string up to and including the first occurrence of termchar are compared. The look utility exits 0 if one or more lines were found and displayed, 1 if no lines were found, and >1 if an error occurred. FILES
/usr/share/dict/words the dictionary SEE ALSO
grep(1), sort(1) COMPATIBILITY
The original manual page stated that tabs and blank characters participated in comparisons when the -d option was specified. This was incor- rect and the current man page matches the historic implementation. HISTORY
A look utility appeared in Version 7 AT&T UNIX. BSD
June 14, 1993 BSD
All times are GMT -4. The time now is 03:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy