Skip to content

refactor: use grep -E/-F instead of fgrep/egrep #102092

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Oct 15, 2022
Merged

Conversation

kxxt
Copy link
Contributor

@kxxt kxxt commented Sep 21, 2022

egrep and fgrep are obsolescent now. This PR updates all egrep and fgrep commands to grep -E and grep -F.

Running egrep/fgrep command with grep v3.8 will output the following warning to stderr:

egrep: warning: egrep is obsolescent; using grep -E

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 21, 2022
@kxxt kxxt force-pushed the patch-1 branch 2 times, most recently from 690e0ad to 0acd8e7 Compare September 21, 2022 13:38
@bjorn3
Copy link
Member

bjorn3 commented Sep 22, 2022

What about BSD and Windows? Do they support grep -E and grep -F? The deprecation only applies to Gnu grep.

@kxxt
Copy link
Contributor Author

kxxt commented Sep 22, 2022

What about BSD and Windows? Do they support grep -E and grep -F? The deprecation only applies to Gnu grep.

It seems that BSD grep supports -E and -F.

https://www.freebsd.org/cgi/man.cgi?query=grep&sektion=&n=1

Mingw grep supports these options, too.

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 26, 2022
@joshtriplett
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 14, 2022

📌 Commit 6135aff has been approved by joshtriplett

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 14, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 14, 2022
refactor: use grep -E/-F instead of fgrep/egrep

`egrep` and `fgrep` are obsolescent now. This PR updates  all `egrep` and `fgrep` commands to `grep -E` and `grep -F`.

Running egrep/fgrep command with grep v3.8 will output the following warning to stderr:

```
egrep: warning: egrep is obsolescent; using grep -E
```

- https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep
- https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 14, 2022
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#102092 (refactor: use grep -E/-F instead of fgrep/egrep)
 - rust-lang#102781 (Improved documentation for `std::io::Error`)
 - rust-lang#103017 (Avoid dropping TLS Key on sgx)
 - rust-lang#103039 (checktools: fix comments)
 - rust-lang#103045 (Remove leading newlines from integer primitive doc examples)
 - rust-lang#103047 (Update browser-ui-test version to fix some flaky tests)
 - rust-lang#103054 (Clean up rust-logo rustdoc GUI test)
 - rust-lang#103059 (Fix `Duration::{try_,}from_secs_f{32,64}(-0.0)`)
 - rust-lang#103067 (More alphabetical sorting)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f72d76d into rust-lang:master Oct 15, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 15, 2022
@kxxt kxxt deleted the patch-1 branch January 28, 2024 10:41
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants