Language Selection

English French German Italian Portuguese Spanish

What's GNU in Old Utilities, Part Two

Filed under
HowTos

Years ago, there was a saying that Unix beginners use grep because it's all they know about, intermediate users use fgrep because it's supposed to be faster, and advanced users use egrep because they've tested it. Each of those three variations used to be its own separate program that did different searches. But no more. The single GNU grep binary has a –F switch to do fixed-string searches like fgrep and a –E switch to do extended regular expression-powered egrep searches. GNU egrep is simply a shell script now, like this:

#!/bin/sh
exec grep –E ${1+"$@"}

So now, plain old grep may actually be a bit faster because it doesn’t start a shell as this egrep does. (The strange-looking ${1+”$@”} in that script is a workaround for old Bourne shells. The sidebar “When Shouldn’t a Parameter Be?” explains.)

Full Story.

(Part One).

More in Tux Machines

Games for GNU/Linux

Red Hat and Fedora

  • Flatpak Universal Linux Package Supports Local Path References for Git Sources
    Alex Larsson from the Flatpak project has announced the release of a new maintenance update to the universal binary package format for Linux kernel-based operating systems. Flatpak 0.6.9 is now the latest version, and it promises to add many great enhancements, among which we can mention the ability to pass partial references every time a terminal command takes a runtime or application name, as well as a brand new command called build-commit-from. Application developers who want to package their apps and distribute it in the Flatpak format can use the above-mentioned command for creating new commits based on the contents of an existing commit, which can be from another local repository or a remote one.
  • Multiple vulnerabilities in RPM – and a rant
    Last year in November I decided that it might be a good idea to fuzz the parsers of package management tools in Linux distributions. I quickly found a couple of issues in DPKG and RPM. For DPKG the process went very smooth. I reported them to Debian's security team, eight days later fixes and security advisories were published by both Debian and Ubuntu, the main distributions using DPKG. For RPM the process was a bit more difficult.
  • Commvault announces support for Red Hat Virtualisation 4
    Back-up and archive specialist CommVault has announced support for Red Hat Virtualisation 4, the open source company's kernel-based virtual machine powered virtualisation platform. Red Hat Virtualisation 4 is built on the company's enterprise Linux distribution. It provides a centralised management platform for both Linux- and Windows-based workloads.
  • Zacks Assigns Rating To Red Hat, Inc. (NYSE:RHT)
  • GSoC Wrap Up
    GSoC 2016 finished last week and i am writing this blog to list the work done by me in last three months for Fedora. My project was to adjust pagure and write script(s) so that we can have pkgs.fedoraproject.org on a pagure instance.

Android Leftovers

GNOME Builder 3.22 Enters Beta with Many Vim Improvements, New Search & Replace

The GNOME Builder open-source IDE (Integrated Development Environment) designed for the GNOME desktop environment will soon get a major update as part of the upcoming GNOME 3.22 release. Read more