Forrest logo
back to the ${ag tool

entr:tldr:1e8e4

entr: Rebuild with `make` if any file in any subdirectory changes.
$ ${ag -l} | entr ${make}
try on your machine

This command is a pipeline command that consists of two parts: ${ag -l} and entr ${make}.

  1. ${ag -l} represents a command that is using the ag (or "the silver searcher") utility. The -l option is used to list only the files in which the search pattern is found. The ${} brackets are typically used in shell scripting to refer to variables or commands.

  2. The | symbol is used to pipe the output of the previous command to the next command, allowing their output to be connected together.

  3. entr ${make} is the second part of the command. entr is a utility that listens to file system events and executes a command when there are changes in the specified files. ${make} represents a command called make, which is a widely used build automation tool in Linux. It is typically used to compile and build projects based on Makefiles.

In summary, this command will search for a pattern using the ag utility, list only the files in which the pattern is found, and then use entr to trigger the make command whenever one of those files is modified.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ${ag tool