I would like to search into directory for all files end by .m for string like @”LBL_18989″ @”LBL_15459″ , @”LBL_14359″ …
My command is :
find . type f -name \*.m | grep '@"LBL_[[0-9]"]+'
but it does not give the expected result.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
You should always quote your arguments. Your -name pattern for find contains an “*”, which means the shell will try to expand it as a glob before passing it to find. You can also use -regex instead of piping the output of find to grep.
Based on jdi’s comment, you may be wanted to search the contents of those files for the given regex. If so, you can use the following: