Find all matching words in text according to pattern
Hello dear Unix shell professionals,
I am desperately trying to get a seemingly simple logic to work. I need to extract words from a text line and save them in an array. The text can look anything like that:
I am handicapped though in different regards:
Can't use perl
Stuck on a ancient GNU bash, version 3.00.16(1)-release (powerpc-ibm-aix5.1)
grep -o is not installed
My attempt was this:
Output:
So it prints the first match correctly, however it ignores all the remaining matches. Please anyone help me with this, I am stuck here for 2 days now . If it works with "awk", it should be fine too, but I can't figure out the syntax. Beware that I use a old shell.
Sir,
I want to check for the repation of a user address in a file i used || as my delimiter and want to check repetaip0n of the address that is mailid and then i have to use IMAP and all.
How can i do this...
I am in linux ...and my file is linux file.
... (5 Replies)
Hi guys,
I need help:
I started receiving automatic emails containing download information. The problem is that these emails are coming in a rich format (I have no control of this) so the important information is buried under a bunch of mumbo-jumbo. To complicated things even further I need to... (10 Replies)
HI....
It's fallow up file ..
#./show.sh click enter button.. i am gettng the fallowup file. its keep on running every time why because there are lots of users working on it.
In that file i want to search pattern between two words
for ex:
SELECT DISTINCT... (7 Replies)
Hi,
I am writing a BASH shell script. I would like to count all the files in the CURRENT directory matching a specific pattern. Could someone suggest the best/simplest way to do this. I have thought of these solutions (for simplicity the pattern is all files starting with A):
ls -1 *A | wc -l... (5 Replies)
Hi,
I have two files that I need to match patterns with and the second file has comma delimited rows of data that match but I'm having trouble getting a script to work that gives me the match output to these sets :
file 1:
PADG_05255
PADG_06803
PADG_07148
PADG_02849
PADG_02886... (8 Replies)
i am not sure what i should be using but would like a simple command that is able to insert a certain block of text that i define or from another text file into a xml file after a certain match is done
for e.g
insert the text
</servlet-mapping>
<!-- beechac added - for epic post-->... (3 Replies)
Hi,
I have following files in my directory:
/TESTDONTDEL> ls -alt
total 14
drwxr-xr-x 2 oracle dba 1024 May 15 06:30 .
-rw-r--r-- 1 oracle dba 40 May 15 06:30 exception.txt
-rw-r--r-- 1 oracle dba 19 May 15 06:22 ful_1234_test1.txt
-rw-r--r-- 1... (2 Replies)
Can someone please assist me, I'm trying to get vi to remove all the occurences of the text in a file i.e. "DEVICE=/dev/mt??". The "??" represents a number variable. Is there a globel search and delete command that I can use?
Thank You in Advance. (3 Replies)
Hello all,
this is my first and probably not my last question around here. I do hope you can help or at least point me in the right direction.
My question is as follows, I need to find files and possible folders which are not owner = AAA group = BBB with a said location and all sub folders ... (7 Replies)
Hi,
I am trying to get a result out of this but fails please help. Have two files /tmp/1 & /tmp/hosts.
/tmp/1
IP=123.456.789.01
WAS_HOSTNAME=abcdefgh.was.tb.dsdc
/tmp/hosts
123.456.789.01
I want this result in /tmp/hosts if hostname is already there dont want duplicate entry.
... (5 Replies)
Discussion started by: rajeshwebspere
5 Replies
LEARN ABOUT DEBIAN
text::lorem
Text::Lorem(3pm) User Contributed Perl Documentation Text::Lorem(3pm)NAME
Text::Lorem - Generate random Latin looking text
SYNOPSIS
use Text::Lorem;
my $text = Text::Lorem->new();
# Generate a string of text with 5 words
$words = $text->words(5);
# Generate a string of text with 2 sentences
$sentences = $text->sentences(2);
# Generate 3 paragraphs
$paragraphs = $text->paragraphs(3);
DESCRIPTION
Often when developing a website or other application it's important to have placeholders for content. This module generates prescribed
amounts of fake Latin text.
CONSTRUCTOR
"new()"
The default constructor, "new()" takes no arguments and returns a Text::Lorem object.
METHODS
"words( INTEGER )"
Returns INTEGER fake Latin words.
"sentences( INTEGER )"
Returns INTEGER sentences in fake Latin.
"paragraphs( INTEGER )"
Returns INTEGER paragraphs of fake Latin text.
THANKS
Thanks to the guys who pushed me off the cliff called comfort and into the scary world of Perl: James Duncan, Leon Brocard.
AUTHOR
Adeola Awoyemi (adeola@fotango.com)
SEE ALSO
L<WWW::Lipsum> and L<http://lipsum.com/>
COPYRIGHT
Copyright 2003 Fotango Ltd. All rights reserved. <http://opensource.fotango.com/> This software is released under the same license as Perl
itself.
perl v5.10.1 2011-01-05 Text::Lorem(3pm)