0
votes
3answers
217 views

How to find files ending with ~ and pyc? [duplicate]

I want to find all files (in current and all subdirectory) which end in'~' or 'pyc'. To do so I have tried the following find pattern: find . -name '*{~,pyc}' find . -name '{*~,*.pyc}' but neither ...
10
votes
5answers
786 views

Pattern matching on path names in bash

I want to act on a list of subdirectories in a directory. Consider: for x in x86-headers/*/C/populate.sh; do echo $x; done This gives x86-headers/elf/C/populate.sh x86-headers/gl/C/populate.sh ...
6
votes
1answer
3k views

What is the .gitignore pattern equivalent of the regex (Big|Small)(State|City)-[0-9]*\.csv

I have a regex I stuck in my .gitignore similar to: (Big|Small)(State|City)-[0-9]*\.csv It didn't work so I tested it against RegexLab.NET. I then found the gitignore man page which led me to ...