6 examples for ack

{{ score }}
  # search for 'foo' on .rb files, recursively
ack --ruby -R 'foo'
{{ score }}
  # search a subdirectory
ack bart lib/simpsons/
{{ score }}
  # Ignore all files matching specified regex (ignoring css in this example)
ack "input" --ignore-file=match:/.+\.css/
{{ score }}
  # use word boundaries, i.e. search only for exact word
ack -w pattern
{{ score }}
  # do not treat search pattern as regular expression (automatic quotation of regular expression metacharacters)
ack -Q "console.log("
{{ score }}
  # The following command searches in files with extension .org
# First we deine the file type with `--type-set` and then we use that file-type as `--org`
ack --type-set org:match:.+org --org reveal