![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Search for a word | on9west | Shell Programming and Scripting | 2 | 04-23-2008 12:15 AM |
| Word search in awk | videsh77 | Shell Programming and Scripting | 8 | 03-08-2007 07:40 PM |
| Search about word | abu_hassan | SUN Solaris | 3 | 02-19-2007 09:17 AM |
| search for certain word in a files from directory | legato | UNIX for Dummies Questions & Answers | 1 | 10-31-2006 02:35 AM |
| Is there any way to open vi on line or word ? | umen | UNIX for Dummies Questions & Answers | 1 | 04-26-2006 07:25 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi guys,I m new one in awk scripting....i want to search a word with in a directory...in that directory haviing many files...if i give a work ,it should open the directory and open each file for to search that particular word....is it possible in awk...tell me guys its really urgent....
|
| Forum Sponsor | ||
|
|
|
|||
|
Hi ,
Doubt on u r Q ..? 1.U want the only list of the files which are WORD contains ..?? or 2.U want search the WORD and process using the awk ..?? For 1st :Try this grep -l <word> <Dir_Path>/*.* for 2nd :Try this => will print the line awk '{ if ( $0 ~/<word>/ ) {print $0} }' <Dir_Path>/*.* Try this let me know its working for u or not thanks Raj |
|
|||
|
Thank raj....
can we give the directory path inside the program...not in comman line....i m writing a program in a file...then i m executing that file...so can u tell me that how can we give the directory path inside the program...i tried a lot.... |
|||
| Google UNIX.COM |