Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SteveHoggNZ/11b5209e2b00e38b54a3c921c2f39b8f to your computer and use it in GitHub Desktop.
Save SteveHoggNZ/11b5209e2b00e38b54a3c921c2f39b8f to your computer and use it in GitHub Desktop.
bash - filtered output to file and stdout
echo '1
2
3
4
LOG: 5
6
LOG: 7' | tee >(grep LOG | sed 's/LOG: //' > tmp.txt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment