Hi, you are using wild cards (*) as in a globbing situation, whereas grep uses regular expressions so the equivalent would be ".*nitin.*". With grep this makes little sense however.
If you are looking for the word nitin, you could use this:
or for words that contain nitin:
additionally you can use -q to silence grep, so you could do something like this:
Last edited by Scrutinizer; 09-26-2011 at 05:11 AM..
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)
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,
I have input file as below. Can you help me?
inac_4y;0;2;Balance;200;1;1;
0;2;Balance;100;1;
0;inac_nq;0;1;Balance;100;1
desired output
Balance;200
Balance;100
Balance;100
-Suresh
Please use and tags when posting code, data or logs etc. to preserve formatting... (5 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)
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)
Hi,
Below is an example :
ST1 PREF: int1 AVAIL: int2
ST2 PREF :int1 AVAIL: int2
I need int1 to come in preferred variable while programming and int2 in available variable
Please help me doing so
Best regards,
Vishal (10 Replies)
Hi Experts,
Can you please advise , why I am not able to make it work, or why this is not working: I spent quite a lot of time on this figuring out , but not working,
file :
This is a test file thanks for your reply
This is another file again
Have a nice day this is a small file... (3 Replies)
Hi,
I am trying below code but the word boundaries not seem to be working. What am I doing incorrectly?
echo " ECHO " | awk '{ q="ECHO" ; if ( $0 ~ /\bq\b/) print "HELLO" ; }'
OR
echo " ECHO " | awk '{ q="ECHO" ; if ( $0 ~ /\b'$q'\b/) print "HELLO" ; }'
Or
echo " ECHO " | awk... (6 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 DEBIAN
dictfmt_index2word
DICTFMT_INDEX2WORD(1) Linux User's Manaul DICTFMT_INDEX2WORD(1)NAME
dictfmt_index2word - Creates a .word index file from a DICTD database .index file
SYNOPSIS
dictfmt_index2word [OPTIONS] [index_file]
DESCRIPTION
dictfmt_index2word creates a word index file on stdout for the index file given on stdin or the command line. A word index file indexes
each subword from the multi-word headwords of the .index file, to the underlying .dict file. A word index file is usually named <base-
name>.word, but this is not mandatory as long as the proper name is used in the dictd configuration file.
OPTIONS --help displays a usage message and exits
--locale locale
use locale for sorting the .word file. If this option is omitted, the default locale "C" is used.
index_file
the .index file to be converted.
AUTHOR
dictfmt_index2word was written by Aleksey Cheusov <vle@gmx.net>.
This manual page was written by Robert D. Hilliard <hilliard@debian.org>.
SEE ALSO dictd(8), dictfmt(1), dictfmt_index2suffix(1)LINUX January 23, 2003 DICTFMT_INDEX2WORD(1)