SyntaxFix
Write A Post
Hire A Developer
Questions
If you want to filter out extensions from the output of another command e.g. "git":
files=$(git diff --name-only --diff-filter=d origin/master... | grep -E '\.cpp$|\.h$') for file in $files; do echo "$file" done