Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8954719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:22:25+00:00 2026-06-15T14:22:25+00:00

I have been trying to do a recursive grep command on files in sub

  • 0

I have been trying to do a recursive grep command on files in sub folders using grep in NTemacs and Cygwin. So far the “best” results have been using grep in eshell. When I use this:

grep “t” -r *

I get a list of all file names containing the letter t, in all sub folders one layer down but notthing else. In Cygwin i get nothing. I’m working on a directroy that is not in the Cygwin install. Don’t know if that mather or not.

What I want is to match the content of a more complex string in all files (and not just the file names, but the content). And in all sub directories.

I would like to use eshell from emacs but I’m open to suggestions, apart form using LINUX. This is a work PC and I don’t want to do all the setup of a LINUX install.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:22:26+00:00Added an answer on June 15, 2026 at 2:22 pm

    i just wrote a very similar answer to another question, but i suspect it’s the same root problem:

    my first thought is that your files have windows line endings (CRLF) as opposed to unix/linux line endings (LF), and that is messing with grep’s ability to parse the file. try running this:

    dos2unix filename
    

    on each file you need to search then try your grep statement again.

    if you need to convert many files across several directories, i suggest using dos2unix with the -exec action of find:

    find . -exec dos2unix {} \;
    

    (add whatever other options you need to find before running that, of course)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have have been trying to make a validator for my xml files. I have
I have been trying to create a ListView which I can sort using drag
I have been trying to make custom radio buttons using HTML, CSS, and JavaScript.
I have been trying to write a recursive version of function itoa , the
I have been at this all day, trying to write a recursive function in
I'm trying to write a memory profiler and so far have been able to
I have been trying to write a recursive function that searches a stack, but
I'm new to Scheme, have been using MIT Scheme for sometime now. I'm trying
Possible Duplicate: Examples of Recursive functions I have been trying to research recursion in
Have been trying to encrypt an xml file to a string so that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.