ls -1 | grep ".h$" -> searches backwards findfirstchar '.' for file-type h [ C++ Header file ]
ls -1 | grep ".cpp$" -> searches backwards findfirstchar '.' for file-type cpp [ C++ Source file ]

etc...

what is the question ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.