summaryrefslogtreecommitdiffstats
path: root/auxiliary/fix-grep/fix-grep.sh
blob: 4faf3443e23a8fc3cf90727e6c9668394739ee01 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

# Fix grep -[EF] for systems that require the historical forms egrep
# and fgrep. Run this script in the top-level Postfix directory as
#     sh auxiliary/fix-grep/fix-grep.sh

# Use only historical grep syntax.
find * -type f | xargs grep -l 'grep -[EF]' | xargs perl -pi -e '
	s/grep -E/egrep/g;
	s/grep -F/fgrep/g;
'