Jza Posted June 8, 2006 Report Share Posted June 8, 2006 So I want to do a less on my email (mbox) I have my email distributed across several folders such as accont#/ 200#/ <-- being year 04/ <-- Number of month 29/ <-- Number of day mail.mbs So what I want is a recursive use of less so I can read all the email with out having to hop on each directory, is there anyway i can do this somehting like: less -R * | grep <keyword> Regards. Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted June 9, 2006 Report Share Posted June 9, 2006 (edited) I'm not exactly sure how you plan on reading all the emails you need to read just by searching for one keyword. Grep will just output the one line that contains the keyword unless you specifically tell it to show X number of lines before and/or after and how will you know how many lines you need? If you want to read every file under the directory recursively, maybe you could do something like: find ./ -name "*" -type f -exec sh -c 'less ${0}' {} \; Edited June 9, 2006 by Steve Scrimpshire Quote Link to comment Share on other sites More sharing options...
neddie Posted July 3, 2006 Report Share Posted July 3, 2006 or maybe you want something like grep -iR <keyword> * Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.