Sponsored Content
Top Forums Web Development Query to print numbers in words Post 302225064 by Yogesh Sawant on Thursday 14th of August 2008 12:23:11 PM
Old 08-14-2008
if you can use Perl, module Number::Spell would be helpful
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to separate numbers and words from a file using shell scripts

Hi, How to separate numbers and words(with full alphabets) in a particular file and store it in two different files. Please help me out for this.Using shell scripting. :confused::confused: (1 Reply)
Discussion started by: kamakshi s
1 Replies

2. Shell Programming and Scripting

Extract numbers below words with awk

Hi all, Please some help over here. I have a Sales.txt file containing info in blocks for every sold product in the pattern showed below (only for 2 products). NEW BLOCK SALE DATA PRODUCT SERIAL 79833269999 146701011945004 .Some other data .Some... (17 Replies)
Discussion started by: cgkmal
17 Replies

3. Shell Programming and Scripting

Query to print numbers in words

Hi, I have to write a shell script that converts numbers in to words below is what i wrote.My script is not running. ----------------------------------- echo -n "Enter number : " read n len= echo $n | wc -c echo " number in words : " for ( i=1; i<len; i++ ) do num=echo $n... (5 Replies)
Discussion started by: bab123
5 Replies

4. Shell Programming and Scripting

Printing the column that begins with certain words/numbers

Hi guys, I have got a file which doesn't have the same number of columns in each line. I would like to print the second column and the one that begins with 33= and has some numbers after '33=' Can you please help me asap? Cheers (7 Replies)
Discussion started by: alexandra_ola
7 Replies

5. Shell Programming and Scripting

Print only matching words

Hi All, I have searched the forum and tried to print only matching(pattern) words from the file, but its printing entire line. I tried with grep -w. I am on sunsolaris. Eg: cat file A|A|F1|F2|A|F3|A A|F10|F11|F14|A| F20|A|F21|A|F25 I have to search for F (F followed by numbers) and ... (5 Replies)
Discussion started by: gsjdrr
5 Replies

6. Shell Programming and Scripting

Difference between words and not between numbers

Hi, Sorry in advance for propably a silly question, but I am a bit lost. On some of the linux job flow I have the following check: if ($file != 1500) then echo ERROR It works ok, all times $file is not equal to 1500 I have the error message. I try to do something similar... (7 Replies)
Discussion started by: essemario
7 Replies

7. UNIX for Dummies Questions & Answers

Trying to sort words and numbers associated with them.

Hi. I have a file containing words and numbers associated with them as follows - c 2 b 5 c 5 b 6 a 10 b 16 c 18 a 19 b 21 c 27 a 28 b 33 a 76 a 115 c 199 c 251 a 567 a 1909 (4 Replies)
Discussion started by: maq
4 Replies

8. Shell Programming and Scripting

Put numbers against the words

Hi All, I tried to solve this but the result gives me all zeros for one file. I failed to do for all 500 files. I have some 500 files with the extension .dat I have another set of files; 500 in number with extension .dic I created these .dic files by using sort -u from the actual .dat files.... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies

9. Shell Programming and Scripting

Adding numbers matching with words

Hi All, I have a file which looks like this: abc 1 abc 2 abc 3 abc 4 abc 5 bcd 1 bcd 3 bcd 3 bcd 5 cde 7 This file is just a miniature version of what I really have. Original file is some 1 million lines long. I have tried to come up with the code for what I wish to accomplish... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

10. UNIX for Dummies Questions & Answers

Print numbers and associated text belonging to an interval of numbers

##### (0 Replies)
Discussion started by: lucasvs
0 Replies
Spell(3pm)						User Contributed Perl Documentation						Spell(3pm)

NAME
Pod::Spell -- a formatter for spellchecking Pod SYNOPSIS
% podspell Thing.pm | ispell or if you don't have a podspell: % perl -MPod::Spell -e "Pod::Spell->new->parse_from_file(shift)" Thing.pm |spell |fmt or: % perl -MPod::Spell -e "Pod::Spell->new->parse_from_filehandle" ...which takes POD on STDIN and sends formatted text to STDOUT ...or instead of piping to spell or ispell, use ">temp.txt", and open temp.txt in your word processor for spell-checking. DESCRIPTION
Pod::Spell is a Pod formatter whose output is good for spellchecking. Pod::Spell rather like Pod::Text, except that it doesn't put much effort into actual formatting, and it suppresses things that look like Perl symbols or Perl jargon (so that your spellchecking program won't complain about mystery words like "$thing" or ""Foo::Bar"" or "hashref"). This class provides no new public methods. All methods of interest are inherited from Pod::Parser (which see). The especially interesting ones are "parse_from_filehandle" (which without arguments takes from STDIN and sends to STDOUT) and "parse_from_file". But you can proba- bly just make do with the examples in the synopsis though. This class works by filtering out words that look like Perl or any form of computerese (like "$thing" or ""N>7"" or ""@{$foo}{'bar','baz'}"", anything in C<...> or F<...> codes, anything in verbatim paragraphs (codeblocks), and anything in the stopword list. The default stopword list for a document starts out from the stopword list defined by Pod::Wordlist, and can be supplemented (on a per-document basis) by having "=for stopwords" / "=for :stopwords" region(s) in a document. ADDING STOPWORDS
You can add stopwords on a per-document basis with "=for stopwords" / "=for :stopwords" regions, like so: =for stopwords plok Pringe zorch snik !qux foo bar baz quux quuux This adds every word in that paragraph after "stopwords" to the stopword list, effective for the rest of the document. In such a list, words are whitespace-separated. (The amount of whitespace doesn't matter, as long as there's no blank lines in the middle of the para- graph.) Words beginning with "!" are deleted from the stopword list -- so "!qux" deletes "qux" from the stopword list, if it was in there in the first place. Note that if a stopword is all-lowercase, then it means that it's okay in any case; but if the word has any capital letters, then it means that it's okay only with that case. So a wordlist entry of "perl" would permit "perl", "Perl", and (less interest- ingly) "PERL", "pERL", "PerL", et cetera. However, a wordlist entry of "Perl" catches only "Perl", not "perl". So if you wanted to make sure you said only "Perl", never "perl", you could add this to the top of your document: =for stopwords !perl Perl Then all instances of the word "Perl" would be weeded out of the Pod::Spell-formatted version of your document, but any instances of the word "perl" would be left in (unless they were in a C<...> or F<...> style). You can have several "=for stopwords" regions in your document. You can even express them like so: =begin stopwords plok Pringe zorch snik !qux foo bar baz quux quuux =end stopwords If you want to use E<...> sequences in a "stopwords" region, you have to use ":stopwords", as here: =for :stopwords virtE<ugrave> ...meaning that you're adding a stopword of "virtu". If you left the ":" out, that'd mean you were adding a stopword of "virtE<ugrave>" (with a literal E, a literal <, etc), which will have no effect, since any occurrences of virtE<ugrave> don't look like a normal human- language word anyway, and so would be screened out before the stopword list is consulted anyway. USING Pod::Spell My personal advice: o Write your documentation in Pod. Pod is described in perlpod. And perlmodstyle has some advice on content. This is the stage where you want to make sure you say everything you should, have good and working examples, and have coherent grammar. o Run it through podchecker. This will report all sorts of problems with your Pod; you may choose to ignore some of these problems. Some, like "*** WARNING: Unknown entity E<qacute>...", you should pay attention to. o Once podchecker errors have been tended to, spellcheck the pod by running it through podspell / Pod::Spell. For any misspellings that are reported in the Pod::Spell-formatted text, fix them in the original. Repeat until there's no complaints. o Run it through podchecker again just for good measure. SEE ALSO
Pod::Wordlist Pod::Parser podchecker also known as Pod::Checker perlpod, perlpodspec HINT
If you feed output of Pod::Spell into your word processor and run a spell-check, make sure you're not also running a grammar-check -- because Pod::Spell drops words that it thinks are Perl symbols, jargon, or stopwords, this means you'll have ungrammatical sentences, what with words being missing and all. And you don't need a grammar checker to tell you that. COPYRIGHT AND DISCLAIMER
Copyright (c) 2001 Sean M. Burke. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The programs and documentation in this dist are distributed in the hope that they will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. AUTHOR
Sean M. Burke "sburke@cpan.org" perl v5.8.8 2001-10-27 Spell(3pm)
All times are GMT -4. The time now is 06:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy