{"id":65797,"date":"2022-09-04T15:21:00","date_gmt":"2022-09-04T15:21:00","guid":{"rendered":"https:\/\/harchi90.com\/its-past-time-to-stop-using-egrep-fgrep-commands-per-gnu-grep-3-8\/"},"modified":"2022-09-04T15:21:00","modified_gmt":"2022-09-04T15:21:00","slug":"its-past-time-to-stop-using-egrep-fgrep-commands-per-gnu-grep-3-8","status":"publish","type":"post","link":"https:\/\/harchi90.com\/its-past-time-to-stop-using-egrep-fgrep-commands-per-gnu-grep-3-8\/","title":{"rendered":"It’s Past Time To Stop Using egrep & fgrep Commands, Per GNU grep 3.8"},"content":{"rendered":"
\n
<\/div>\n

GNU Grep 3.8 was released today for this commonly-used command-line utility for search plain text data. With the GNU Grep 3.8 it’s now made more clear that if you are still relying on the egrep<\/em> and fgrep<\/em> commands, it’s past due for switching to just grebe<\/em> with the appropriate command-line arguments.<\/p>\n

The egrep and fgrep commands have been deprecated since 2007. Beginning with GNU Grep 3.8 today, calling these commands will now issue a warning to the user that instead they should use grep -E<\/em> and grep -F<\/em>, respectively. Eventually, GNU Grep will drop the egrep \/ fgrep commands completely but there doesn’t seem to be a firm deadline yet for when that removal will happen.\n<\/p>\n

Running egrep or fgrep on GNU Grep 3.8+ will show the warning of:
\n<\/p>\n

$cmd: warning: $cmd is obsolescent; using @[email\u00a0protected] @[email\u00a0protected]<\/p><\/blockquote>\n

The GNU Grep documentation added further details on the planned removal:
\n<\/p>\n

What happened to egrep and fgrep?<\/p>\n

7th Edition Unix had commands egrep and fgrep that were the counterparts of the modern grep – and grep -F. Although breaking up grep into three programs was perhaps useful on the small computers of the 1970s, egrep and fgrep were not standardized by POSIX and are no longer needed. In the current GNU implementation, egrep and fgrep issue a warning and then act like their modern counterparts; Eventually, they are planned to be removed entirely.\n<\/p>\n

If you prefer the old names, you can use use your own substitutes, such as a shell script named @command{egrep} with the following contents:\n<\/p>\n

#!\/bin\/sh
\n
exec grep -E “[email\u00a0protected]@”<\/p>\n<\/blockquote>\n

In addition to the egrep\/fgrep warnings, GNU Grep 3.8 has its -P option now based on PCRE2 rather than the older PCRE, regular expressions with stray backslashes now cause warnings, and there are various bug fixes.<\/p>\n

More details on GNU Grep 3.8 via today’s release announcement.<\/p>\n<\/div>\n

.<\/p>\n","protected":false},"excerpt":{"rendered":"

GNU Grep 3.8 was released today for this commonly-used command-line utility for search plain text data. With the GNU Grep 3.8 it’s now made more clear that if you are still relying on the egrep and fgrep commands, it’s past due for switching to just grebe with the appropriate command-line arguments. The egrep and fgrep …<\/p>\n

It’s Past Time To Stop Using egrep & fgrep Commands, Per GNU grep 3.8<\/span> Read More »<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[4],"tags":[1111,1110,1108,1107,1114,1112,1109,1113,1106,1117,1115,1116],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":44896,"url":"https:\/\/harchi90.com\/glibc-2-36-dropping-dt_hash-has-been-breaking-easy-anti-cheat-games-with-steam-play\/","url_meta":{"origin":65797,"position":0},"title":"Glibc 2.36 Dropping DT_HASH Has Been Breaking Easy Anti Cheat Games With Steam Play","date":"August 14, 2022","format":false,"excerpt":"Those on rolling-release Linux distributions that are quick to adapt to new toolchain updates are finding Easy Anti Cheat (EAC) enabled games breaking when running on the recently released Glibc 2.36. The breakage stems from the DT_HASH section being dropped in GNU C Library but EAC being among the few\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":38504,"url":"https:\/\/harchi90.com\/bus1-working-on-r-linux-a-rust-capability-based-linux-runtime\/","url_meta":{"origin":65797,"position":1},"title":"BUS1 Working On “r-linux” – A Rust Capability-Based Linux Runtime","date":"August 7, 2022","format":false,"excerpt":"BUS1 started out as a Linux kernel IPC module following the failure of KDBUS and while there still are occasional commits to that out-of-tree BUS1 kernel module, the involved (Red Hat) developers have been primarily working on Dbus-Broker as the high performance, user-space D-Bus implementation that delivers greater speed and\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":47201,"url":"https:\/\/harchi90.com\/microsoft-canonical-announce-native-net-6-for-ubuntu-22-04-lts\/","url_meta":{"origin":65797,"position":2},"title":"Microsoft + Canonical Announce Native .NET 6 For Ubuntu 22.04 LTS","date":"August 16, 2022","format":false,"excerpt":"The latest partnership between Microsoft and Canonical is an announcement today of native .NET availability for Ubuntu 22.04 LTS hosts as well as containers. Microsoft's .NET 6 is now available on Ubuntu 22.04 LTS via a simple sudo apt install dotnet6. There are also appliance images being offered now with\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":52686,"url":"https:\/\/harchi90.com\/open-source-nvidia-vulkan-driver-nvk-sees-uptick-in-activity-this-week\/","url_meta":{"origin":65797,"position":3},"title":"Open-Source NVIDIA Vulkan Driver “NVK” Sees Uptick In Activity This Week","date":"August 22, 2022","format":false,"excerpt":"The open-source NVIDIA Vulkan driver \"NVK\" being developed for Mesa has seen a busy week of new development activity on this work-in-progress solution. NVK was started by Red Hat engineers as an open-source NVIDIA Vulkan driver being worked on by Nouveau developers like Karol Herbst at Red Hat. This Vulkan\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"fifu_image_url":"https:\/\/www.phoronix.com\/\/assets\/categories\/gnu.webp","_links":{"self":[{"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/posts\/65797"}],"collection":[{"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/comments?post=65797"}],"version-history":[{"count":0,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/posts\/65797\/revisions"}],"wp:attachment":[{"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/media?parent=65797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/categories?post=65797"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/tags?post=65797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}