- libpcre
- liblzma
$ sudo yum install -y pcre-devel
$ sudo yum install xz-devel
$ cd /usr/local/src
$ sudo git clone https://github.com/ggreer/the_silver_searcher.git
$ cd the_silver_searcher
$ sudo ./build.sh
$ sudo make install
$ which ag
/usr/local/bin/ag
@warb12
I don't found "the_silver_searcher" for RHEL/OEL 8 release
You must build it form src:
[lot@oel8 src]$ cat /etc/os-release | grep '^NAME=' | cut -d'"' -f2 && uname -vrp Oracle Linux Server 4.18.0-147.0.3.el8_1.x86_64 #1 SMP Wed Nov 20 19:11:37 PST 2019 x86_64
git clone https://github.com/ggreer/the_silver_searcher.git && cd the_silver_searcher/ ./build.sh make sudo make install
Then:
`[lot@oel8 ~]$ ll /usr/local/bin/ag && LANG=US /usr/local/bin/ag | head -n10
-rwxr-xr-x. 1 root root 319000 дек 6 11:40 /usr/local/bin/ag
Usage: ag [FILE-TYPE] [OPTIONS] PATTERN [PATH]
Recursively search for PATTERN in PATH.
Like grep or ack, but faster.
Example:
ag -i foo /bar/`