Linux / UNIX Tech Support Forum
This is a discussion on word search in file within the Coding in General forums, part of the Development/Scripting category; Hi I want to give a word from command line and search it in a file whether that word is ...
|
|||||||
| Coding in General Discussion on PHP/Perl/Python/Ruby/GNU C or C++. MySQL, PgSQL and (X)HTML or any other programming languages you want. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
| Sponsored Links | ||
|
|
|
||||
|
use grep command
Code:
grep -w 'word-name' /path/to/file egrep -wi 'word1|word2' /path/to/file
__________________
Rocky Jr. What's wrong? I hope I am not making you uncomfortable... Never send a boy to do a mans job. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| pattern search with numbers | mercuryshipz | Coding in General | 0 | 14-02-2008 11:16 PM |
| find a word in a file, and change a word beneath it ?? | vikas027 | Shell scripting | 2 | 14-02-2008 12:53 AM |
| Search Pattern And Arrays | mercuryshipz | Coding in General | 1 | 11-02-2008 02:26 PM |
| PhpmyAdmin-Can browse/search some tables, but not others | blinton25 | Databases servers | 1 | 08-06-2007 11:28 PM |
| user pass word | sparky | Shell scripting | 1 | 26-06-2006 07:19 PM |