Codebase list debian-goodies / 181aa85
Replace calls to egrep and fgrep with grep and the according options Closes: #1019328 Thanks to Vincent Lefevre for the reminder! Axel Beckert 1 year, 7 months ago
7 changed file(s) with 24 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
205205 .IP \(em
206206 The output of running the following command as root:
207207 .PP
208 lsof | egrep 'delete|DEL|path inode'
208 lsof | grep -E 'delete|DEL|path inode'
209209 .PP
210210
211211 .P
0 debian-goodies (0.89) UNRELEASED; urgency=medium
1
2 * Replace calls to egrep and fgrep with grep and the according options.
3 (Closes: #1019328) Thanks to Vincent Lefevre for the reminder.
4
5 -- Axel Beckert <abe@debian.org> Fri, 09 Sep 2022 12:18:18 +0200
6
07 debian-goodies (0.88) unstable; urgency=low
18
29 [ Axel Beckert ]
6161 done
6262
6363 pattern="$1"
64 if echo "$pattern" | fgrep -q ":"; then
64 if echo "$pattern" | grep -Fq ":"; then
6565 package=$(echo "$pattern" | awk -F: '{print $1}')
6666 arch=$(echo "$pattern" | awk -F: '{print $2}')
6767 archfilter="grep-dctrl -FArchitecture $arch"
6565 shift
6666 done
6767
68 for pkgglob in "$@"; do dglob -0f "$pkgglob"; done | xargs -0r $prog $opts "$pat"
68 # *SIGH*, unfortunately needed for GNU grep 3.8
69 case "$prog" in
70 egrep) prog=grep; opts="$opts -E" ;;
71 fgrep) prog=grep; opts="$opts -F" ;;
72 esac
73
74 for pkgglob in "$@"; do dglob -0f "$pkgglob"; done | xargs -0r "$prog" $opts "$pat"
1616 in those packages. It uses dglob's substring pattern matching for the package
1717 names.
1818
19 If B<dgrep> is invoked as B<degrep>, B<dfgrep> or B<dzgrep> then L<egrep(1)>,
20 L<fgrep(1)> or L<zgrep(1)> is used instead of L<grep(1)>.
19 If B<dgrep> is invoked as B<degrep>, B<dfgrep> or B<dzgrep>, etc. then
20 L<grep(1)> with option C<-E> or C<-F> respectively the command
21 L<zgrep(1)> is used instead of L<grep(1)>.
2122
2223 =head1 OPTIONS
2324
6061
6162 =head1 SEE ALSO
6263
63 L<grep(1)>, L<egrep(1)>, L<fgrep(1)>, L<zgrep(1)>, L<dglob(1)>, L<regex(7)>, L<dpkg(8)>
64 L<grep(1)>, L<zgrep(1)>, L<dglob(1)>, L<regex(7)>, L<dpkg(8)>
4848 file=$2
4949 curl $CURLOPTS "$url" >"$file" 2>/dev/null
5050 if ! [ -s "$file" ] ||
51 egrep -q "<title>403.*Forbidden</title>" "$file" ||
52 egrep -q "<h1>Manpage not found</h1>" "$file" ; then
51 grep -Eq "<title>403.*Forbidden</title>" "$file" ||
52 grep -Eq "<h1>Manpage not found</h1>" "$file" ; then
5353 return 1
5454 fi
5555 return 0
2121 elif [ -n "$srcdir" ]; then
2222 cat debian/control | sed ':a;N;$!ba;s/\(Build-Depends[^ ]*:[^\n:]*\)\n/\1 /g'
2323 fi | \
24 fgrep Build-Depends | \
24 grep -F Build-Depends | \
2525 tr '|,' ' ' | \
2626 sed -e 's/^Build-Depends[^ ]*://; s/([^()]*)//g; s/<[^<>]*>//g; s/\[[^]]*\]//g;'
2727 )
3030 for pkg in $bd; do
3131 which-pkg-broke $pkg
3232 done | \
33 fgrep -v "has no install time info" | \
33 grep -Fv "has no install time info" | \
3434 while read pkg date; do
3535 echo `date +%s -d "$date"` $pkg
3636 done | \