3

I'd like to use ag as if I would use grep with --line-buffered. Is it possible? If not what other options do I have to mimic such behaviour?

Gabor Marton
  • 2,039
  • 2
  • 22
  • 33

1 Answers1

3

I would like to have ag support --line-buffered style functionality as well.

I have raised PR #719 against the ag Github repo to request this functionality.

In the meantime, the best solution I've found is to wrap ag with stdbuf -oL.

# instead of grep
grep --line-buffered pattern

# use ag with a stdbuf wrapper
stdbuf -oL ag pattern
fallwith
  • 31
  • 3