Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# script to collect input until the end then overwrite an existing file
# with the provided input. Intended to simplify this pattern:
# cat file | grep | awk | sed > temp
# rm file
# mv temp file
# into this pattern:
# cat file | grep | awk | sed | rewrite file
# need the file to overwrite