To find individual words, you need to put all of the owrds into a single column first:
Next look for words starting with m and with all lower case letters
Pipe the above command into your grep statement, and work from there.
Hi,
When we "grep" for a word in a file, it returns the lines containing the word that we searched for. Is there a way to display only the words and not the entire line containing them.
Thanks
Ananth (6 Replies)
hi, consider the below line in a text file,
'Y',getdate(),'N','V',NULL .....
'N',getdate(),'Y','D',NULL .....
'Y','N','Y',getdate(),'Y','D',NULL ....
as u see above, i want only the second word after the getdate() word...
getdate() will not come 2nd word alwys it may be any position but i... (11 Replies)
Hello All,
I am trying to write a script to search in my current directory to look for all files that end with HTML and look for any HTML tags that are in upper case. for example if I were to grep test.html and test.html has a tag <P> instead of <p> then it would print the file name. This is... (11 Replies)
how do i print uppercase words in a string in PERL
For example
$str=" welcome to UNIX programming"
should print UNIX
$str="WELCOME to unix programming"
should print WELCOME
i itried the following
/\s+\w+\b/ $str
Can u help me in to get a uppercase word in PERL (3 Replies)
ok, so this is proving to be kind of difficult even though it should not be.
say for instance I want to grep out ONLY the word fkafal from the below output, how do I do it?
echo ajfjf fjfjf iafjga fkafal foeref afoafahfia | grep -w "fkafal"
If i run the above command, i get back all the... (4 Replies)
Hi all,
FileOne
family balance >>>>>
0 0
0 0
java.io.FileNotFoundException: Settings.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
..
....
.....
.....
java.lang.NullPointerException
...
.....
......
Stacktrace:
at... (2 Replies)
I want to make the first character of some words to be uppercase. I have a file like the one below.
uid,givenname,sn,cn,mail,telephonenumber
mattj,matt,johnson,matt johnson,mattj@gmail.com
markv,mark,vennet,matt s vennet,markv@gmail.com
mikea,mike,austi,mike austin,mike@gmail.com
I want... (3 Replies)
Hi
can we grep for a word and print the next word of the greped word?
ex:- create or replace function function_name
create function function_name
we should search for word "function" and output next word "function_name" from both lines. (3 Replies)
The title pretty much defines the problem. I have text files that are all in caps. I would like to convert them to lowercase, but have the first letter of the first word in each sentence in uppercase.
I already have SED on the server for fixing / tweaking text files, but I'm open to other... (5 Replies)
I have a file "test" with following contents:
cat test
abc
abcd_efg
abc_abc
I want to only grep for abc or abc_ without getting other results, how do I achieve this?
If I use grep -w abc test option I get only abc and not abc_.
If I use egrep "abc|abc_" test its still printing... (3 Replies)
Discussion started by: ctrld
3 Replies
LEARN ABOUT PLAN9
look
LOOK(1) General Commands Manual LOOK(1)NAME
look - find lines in a sorted list
SYNOPSIS
look [ -dfnixtc ] [ string ] [ file ]
DESCRIPTION
Look consults a sorted file and prints all lines that begin with string. It uses binary search.
The following options are recognized. Options dfnt affect comparisons as in sort(1).
-i Interactive. There is no string argument; instead look takes lines from the standard input as strings to be looked up.
-x Exact. Print only lines of the file whose key matches string exactly.
-d `Directory' order: only letters, digits, tabs and blanks participate in comparisons.
-f Fold. Upper case letters compare equal to lower case.
-n Numeric comparison with initial string of digits, optional minus sign, and optional decimal point.
-t[c] Character c terminates the sort key in the file. By default, tab terminates the key. If c is missing the entire line comprises the
key.
If no file is specified, /lib/words is assumed, with collating sequence df.
FILES
/lib/words
SOURCE
/sys/src/cmd/look.c
SEE ALSO sort(1), grep(1)DIAGNOSTICS
The exit status is "not found" if no match is found, and "no dictionary" if file or the default dictionary cannot be opened.
LOOK(1)