Skip to content

Instantly share code, notes, and snippets.

@kisom
Created August 2, 2012 06:02
Show Gist options
  • Save kisom/3234256 to your computer and use it in GitHub Desktop.
Save kisom/3234256 to your computer and use it in GitHub Desktop.
Strip out extraneous information from a file to a plain text file (i.e. script(1) output)
#!/bin/sh
# -r is lunix only
cat $1 | sed -E "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | col -b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment