Skip to content

Instantly share code, notes, and snippets.

View Mirdarthos's full-sized avatar

Mirdarthos

  • South Africa
  • Pretoria
View GitHub Profile
@Mirdarthos
Mirdarthos / tcp.sh
Last active June 20, 2024 08:59
Terminal output copier
#!/usr/bin/bash
# This copies the complete output of a command piped to it, or a complete file
# including unprintable characters, making it nice for copying terminal output
# for use elsewhere, like a on Discord Forum in-between "```" tags, or HTML
# "<pre></pre>" tags.
#
# Installation instructions:
# 1. Just copy it anywhere you like. For exaample, I'm using /usr/local/bin/
# so that it's easier sysstem-wide, should it be necessary for acecess by
# more than one user. If not, you can copy it anywhere.