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 ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| Sponsored Links | ||
|
|
|
||||
|
use grep command
Code:
grep -w 'word-name' /path/to/file egrep -wi 'word1|word2' /path/to/file
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
![]() |
| Bookmarks |
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 | 02-14-2008 11:16 PM |
| find a word in a file, and change a word beneath it ?? | vikas027 | Shell scripting | 2 | 02-14-2008 12:53 AM |
| Search Pattern And Arrays | mercuryshipz | Coding in General | 1 | 02-11-2008 02:26 PM |
| PhpmyAdmin-Can browse/search some tables, but not others | blinton25 | Databases servers | 1 | 06-08-2007 11:28 PM |
| user pass word | sparky | Shell scripting | 1 | 06-26-2006 07:19 PM |