Working with Elasticsearch can get hard when generating thounsand of files for a bulk import. What if you need to replace any text on all those files? Fix a typo? Change a value?

Bash and sed makes it quite fast:

$ ls directory | wc
  31915   31915  957450

$ du -sh directory
37G     gavel
$ sed -i -- 's/"foo":null/"foo":"bar"/g' *
# Search "foo":null and replace with "foo":"bar"