Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

How to ignore multiple files with `ag` The Silver Searcher

You could use brace expansion e.g.

ag pattern --ignore={'*assets*','*scripts*'}  path_to_search

or, as Glenn suggests here, process substitution:

ag pattern -p <(printf "*%s*\n" assets scripts) path_to_search

Tags:

Ack

Ag

Regular Expression

Patterns

Related

How to trigger action on low-memory condition in Linux? Making subtitles (.srt) bigger or smaller with mpv Encoding of cyrillic filenames in zip files How to interpret character ranges in charmap files? how to execute more than one tar commands for parallel execution? How to detect and mitigate the Intel escalation of privilege vulnerability on a Linux system (CVE-2017-5689)? After I editted my .bashrc I got ghosts in my prompt Standard location for holding software source files List of terminal generated signals (eg Ctrl-C -> SIGINT) Send SIGWINCH from the keyboard How to find a file from any directory macOS rm command '-W' option - undelete

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy