Find the answer to your Linux question:
Results 1 to 2 of 2
I hope it can recursively look for aaa in all *.f90 files in all the subsequent directories, but it complains grep: *.f90: No such file or directory Any idea why ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2011
    Posts
    13

    Question help! grep -r -i "aaa" *.f90 does not do what I want


    I hope it can recursively look for aaa in all *.f90 files in all the subsequent directories, but it complains

    grep: *.f90: No such file or directory

    Any idea why this happens? Thanks,

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,691
    Do this instead:
    Code:
    find . -type f -iname '*.f90' -exec grep --with-filename -i "aaa" {} \;
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •