Solved

regex question

Posted on 2002-05-07
2
177 Views
Last Modified: 2010-04-22
I want to find all the .c, .h, and .cpp files in a directory tree.  I can find all the .c and .h files by using the following...

find . -name "*\.[ch]"

how do i modify this to find the .cpp files as well?

Thanks,
Mike.
0
Comment
Question by:MDarling
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
IainHere earned 50 total points
ID: 6993661
find . -name "*\.[ch]" -o -name "*.cpp"

o is for or.  You can use -or on some systems if you want.
0
 
LVL 3

Author Comment

by:MDarling
ID: 6993813
Thanks Iain.  Just the job!

Regards,
Mike.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mysql server issue in linux server 5 68
usage of %{name} in rpm spec file 4 58
Multipart email template with broken links (PHP/Postfix) 5 346
Help with Ubuntu 14.04 LTS 10 142
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question