0

I need a list of all file types of text files in CVS (such as .cpp,.h etc. )

can it be done?

Oded
  • 795
  • 2
  • 12
  • 32

1 Answers1

0

I know it's quick and dirty but you can play with regular expressions, grepping, redirecting to a file, sorting...(blah blah blah):

cvs ls -R [path to repo] | grep "\.[A-Za-z0-9]*$" | sed 's/.*\(\.[A-Za-z0-9]*\)$/\1/' > fileExtensions && sort fileExtensions | uniq

Explanation:

  • list all files in the repository
  • print only those with an extension
  • extract the extension with sed
  • redirect output to a file
  • sort the file, then print unique lines
danieli
  • 33
  • 5