Skip to content

Instantly share code, notes, and snippets.

@ddebin
Created July 20, 2020 14:23
Show Gist options
  • Save ddebin/d7dee9545ea26cb5fe65363d418c9005 to your computer and use it in GitHub Desktop.
Save ddebin/d7dee9545ea26cb5fe65363d418c9005 to your computer and use it in GitHub Desktop.
How-to filter out a screenlog.0 to remove useless CR (useful if you want to convert ANSI text to PNG)
#!/bin/bash
cat screenlog.0 | perl -ne 's/[^\r\n]*\r(?!\n)//g; print;' > screenlog.0.filtered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment