![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can find Null value in If condition | koti_rama | Shell Programming and Scripting | 2 | 07-17-2007 06:20 AM |
| Grep for NULL for a specific field in a unix file | sureshg_sampat | UNIX for Dummies Questions & Answers | 5 | 11-24-2006 09:21 AM |
| Grep for NULL in a pipe delimited file | sureshg_sampat | Shell Programming and Scripting | 5 | 11-21-2006 06:15 AM |
| Find files which contain a null character | Bab00shka | UNIX for Dummies Questions & Answers | 5 | 12-16-2005 10:41 AM |
| GREP a string with NULL Character | weerich | UNIX for Dummies Questions & Answers | 3 | 09-18-2001 02:30 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Using /dev/null with grep and find
Hi,
I am trying to display the filename in which a string was found after using find and grep. For this after some googling I found that this works: find -name "*.java" -exec grep "searchStr" {} /dev/null \; I wanted to know the difference between the above and the following: find -name "*.java" -exec grep "searchStr" {} \; When I use the first command with /dev/null I get the filename as well in which the string was found which is not the case in second. Since /dev/null is a null device how does the flow work such that appending it starts displaying the file name. TIA Gaurav |
| Bookmarks |
| Tags |
| devnull, find, grep |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|