-
-
Save nathanfranke/cbd4d6442249058f502592845f20064b to your computer and use it in GitHub Desktop.
Minecraft: Filter Matrix AC trial message with grep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -Dterminal.jline=false -Dterminal.ansi=true -jar Paper-*.jar nogui | grep --color=never --invert --extended-regexp '^.{0,3}\[[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2} INFO\]: '"$(printf \\e)"'\[[0-9;]*m\[Matrix\] '"$(printf \\e)"'\[[0-9;]*m\(!\) You are currently using free\(trial\) version of Matrix!'"$(printf \\e)"'\[[0-9;]*m$' |
Hello, when the console starts, it turns off immediately
Hello, when the console starts, it turns off immediately
- Are you on the latest version of Paper spigot?
- Is your paper jar named
Paper-*.jar
where*
is anything? - Are you using Linux? You need Linux for this (or a bash shell with gnu corelibs installed). If you don't know what Linux is, you probably aren't using it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-Dterminal.jline=false -Dterminal.ansi=true
- Force colored output even though we are piping to grep..{0,3}
- Output can start with 0-3 garbage characters (usually ansi escape codes). This check can be improved.\[[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2} INFO\]:
- Message timestamp and type.'"$(printf \\e)"'\[[0-9;]*m\[Matrix\] '"$(printf \\e)"'\[[0-9;]*m\(!\) You are currently using free\(trial\) version of Matrix!'"$(printf \\e)"'\[[0-9;]*m$'
- Actual message. Each printf instance converts \ESC[123m codes.