4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-03-01 20:45:37 +08:00

Cygwin: replace all fgrep' with grep -F'

Unfortunately fgrep is now deprecated in a very pushy way.
Make sure to use grep -F instead all around, even in docs
and comments/

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2024-01-18 10:53:25 +01:00
parent 70b27cee0c
commit d45261f62a
5 changed files with 8 additions and 8 deletions

@ -530,9 +530,9 @@ details. */
The mkvers.sh script at the top level produces a .cc file which initializes The mkvers.sh script at the top level produces a .cc file which initializes
a cygwin_version structure based on the above version information and a cygwin_version structure based on the above version information and
creates a string table for grepping via "fgrep '%%%' cygwinwhatever.dll" creates a string table for grepping via "grep -F '%%%' cygwinwhatever.dll"
if you are using GNU grep. Otherwise you may want to do a if you are using GNU grep. Otherwise you may want to do a
"strings cygwinwhatever.dll | fgrep '%%%'" instead. "strings cygwinwhatever.dll | grep -F '%%%'" instead.
This will produce output such as: This will produce output such as:

@ -150,7 +150,7 @@ main ()
char name[32], *c; char name[32], *c;
FILE *pp; FILE *pp;
pp = popen ("locale -a | grep -a '_' | fgrep -v .", "r"); pp = popen ("locale -a | grep -a '_' | grep -F -v .", "r");
if (!pp) if (!pp)
{ {
perror ("popen failed"); perror ("popen failed");

@ -218,7 +218,7 @@ main ()
char name[32], *c; char name[32], *c;
FILE *pp; FILE *pp;
pp = popen ("locale -a | grep -a '_' | fgrep -v .", "r"); pp = popen ("locale -a | grep -a '_' | grep -F -v .", "r");
if (!pp) if (!pp)
{ {
perror ("popen failed"); perror ("popen failed");

@ -380,7 +380,7 @@ cygexec, you can find them with a script like this:
<screen> <screen>
#!/bin/sh #!/bin/sh
cd /bin; for f in `find . -type f -name '*.exe'`; do cd /bin; for f in `find . -type f -name '*.exe'`; do
cygcheck $f | (fgrep -qi cygwin1.dll || echo $f) cygcheck $f | (grep -Fqi cygwin1.dll || echo $f)
done done
</screen> </screen>

@ -12,7 +12,7 @@ fi
for f in "$@" for f in "$@"
do do
f=`basename "$f"` f=`basename "$f"`
if fgrep -q 'xi:include' "$f" if grep -F -q 'xi:include' "$f"
then then
# This file uses XIncludes. Let's chase its deps recursively. # This file uses XIncludes. Let's chase its deps recursively.
base=`basename "$f" .xml` base=`basename "$f" .xml`