public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: replace all `fgrep' with `grep -F' Date: Thu, 18 Jan 2024 12:09:04 +0000 (GMT) [thread overview] Message-ID: <20240118120904.4A7A53858C41@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d45261f62a15f8abd94a1031020b9a9f455e4eed commit d45261f62a15f8abd94a1031020b9a9f455e4eed Author: Corinna Vinschen <corinna@vinschen.de> AuthorDate: Thu Jan 18 10:53:25 2024 +0100 Commit: Corinna Vinschen <corinna@vinschen.de> CommitDate: Thu Jan 18 10:53:25 2024 +0100 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> Diff: --- winsup/cygwin/include/cygwin/version.h | 4 ++-- winsup/cygwin/linux-locale-helpers/fetch-lc_messages-from-linux.c | 6 +++--- winsup/cygwin/linux-locale-helpers/fetch-lc_time_era-from-linux.c | 2 +- winsup/doc/faq-programming.xml | 2 +- winsup/doc/xidepend | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 3036878c4d07..4122125a6045 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -530,9 +530,9 @@ details. */ 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 - 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 - "strings cygwinwhatever.dll | fgrep '%%%'" instead. + "strings cygwinwhatever.dll | grep -F '%%%'" instead. This will produce output such as: diff --git a/winsup/cygwin/linux-locale-helpers/fetch-lc_messages-from-linux.c b/winsup/cygwin/linux-locale-helpers/fetch-lc_messages-from-linux.c index 03755c6aa7d8..e83bad66ff9b 100644 --- a/winsup/cygwin/linux-locale-helpers/fetch-lc_messages-from-linux.c +++ b/winsup/cygwin/linux-locale-helpers/fetch-lc_messages-from-linux.c @@ -149,8 +149,8 @@ main () { char name[32], *c; FILE *pp; - - pp = popen ("locale -a | grep -a '_' | fgrep -v .", "r"); + + pp = popen ("locale -a | grep -a '_' | grep -F -v .", "r"); if (!pp) { perror ("popen failed"); @@ -160,7 +160,7 @@ main () { c = strchr (name, '\n'); if (c) - *c = '\0'; + *c = '\0'; read_locale_messages (name); } pclose (pp); diff --git a/winsup/cygwin/linux-locale-helpers/fetch-lc_time_era-from-linux.c b/winsup/cygwin/linux-locale-helpers/fetch-lc_time_era-from-linux.c index 1ee75ca6ba71..66dc7aa39ab3 100644 --- a/winsup/cygwin/linux-locale-helpers/fetch-lc_time_era-from-linux.c +++ b/winsup/cygwin/linux-locale-helpers/fetch-lc_time_era-from-linux.c @@ -218,7 +218,7 @@ main () char name[32], *c; FILE *pp; - pp = popen ("locale -a | grep -a '_' | fgrep -v .", "r"); + pp = popen ("locale -a | grep -a '_' | grep -F -v .", "r"); if (!pp) { perror ("popen failed"); diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml index ba00dfea5a67..a834298599d7 100644 --- a/winsup/doc/faq-programming.xml +++ b/winsup/doc/faq-programming.xml @@ -380,7 +380,7 @@ cygexec, you can find them with a script like this: <screen> #!/bin/sh 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 </screen> diff --git a/winsup/doc/xidepend b/winsup/doc/xidepend index cc04f4a121c5..bfbadfef2901 100755 --- a/winsup/doc/xidepend +++ b/winsup/doc/xidepend @@ -12,7 +12,7 @@ fi for f in "$@" do f=`basename "$f"` - if fgrep -q 'xi:include' "$f" + if grep -F -q 'xi:include' "$f" then # This file uses XIncludes. Let's chase its deps recursively. base=`basename "$f" .xml`
reply other threads:[~2024-01-18 12:09 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240118120904.4A7A53858C41@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).