Skip to content

Instantly share code, notes, and snippets.

@daboross
Last active December 12, 2015 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save daboross/4685649 to your computer and use it in GitHub Desktop.
Save daboross/4685649 to your computer and use it in GitHub Desktop.
mkdir logs/
cp server.log logs/$(date +%Y-%m-%d).log
for remove in 's/\[37;1m//g' 's/\[31;22m//g' 's/\[34;22m//g' 's/\[32;22m//g' 's/\[36;22m//g' 's/\[35;22m//g' 's/\[33;22m//g' 's/\[37;22m//g' 's/\[30;1m//g' 's/\[30;22m//g' 's/\[32;1m//g' 's/\[36;1m//g' 's/\[31;1m//g' 's/\[35;1m//g' 's/\[33;1m//g' 's/\[37;1m//g' 's/\[0;39m//g' 's/\[34;1m//g' 's/\[5m//g' 's/\[9m//g' 's/\[3m//g' 's/\[21m//g' 's/\[4m//g' 's/\[m//g' 's/\[33m//g' 's/\[0m//g' 's/§a//g' 's/§b//g' 's/§c//g' 's/§d//g' 's/§e//g' 's/§f//g' 's/§1//g' 's/§2//g' 's/§3//g' 's/§4//g' 's/§5//g' 's/§6//g' 's/§7//g' 's/§8//g' 's/§9//g' 's/§0//g' 's/§r//g' 's/§l//g' 's/§n//g' 's/§o//g' 's/§k//g' 's/§m//g' 's/Â//g'
do
sed -i "$remove" logs/$(date +%Y-%m-%d).log
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment