sgrep command not found

In this troubleshooting guide we learn how to fix sgrep command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

sgrep: command not found

or when using sudo you get the following error message

sudo: sgrep: command not found

Solutions to sgrep: command not found

How To Fix sgrep: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu sgrep is provided by sgrep package.

sgrep is:

A tool for searching text files and filtering text streams for structured criteria. Sgrep implements a query language based on so called region expressions.

Like grep, sgrep can be used for any kind of text files. However it is most useful for text files containing some kind of structured text. A file containing structured text could be defined as a file, which obeys some syntax. Examples of structured text files are SGML, HTML, C, TeX and mail files.

To fix this problem, we can install more using the command below.

sudo apt-get -y install sgrep

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install sgrep.

sudo apt -y install sgrep

Or if you have aptitude installed you can use the following command.

sudo aptitude install sgrep

Summary

In this tutorial we learn how to fix sgrep command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.