Created
February 1, 2015 03:05
-
-
Save olivierrr/7ef676c28d6c428ad0a7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
# compile brainf*ck to groot | |
# "+" "i am groot" | |
# "-" "I am Groot" | |
# "." "I AM GROOOT" | |
# ">" "I AM GROOT" | |
# "<" "I am groot" | |
# "," "I am grooot" | |
# "[" "I'm Groot" | |
# "]" "We are Groot" | |
sed "s/+/i am groot\n/g ; s/-/I am Groot\n/g ; s/\./I AM GROOOT\n/g ; s/>/I AM GROOT\n/g ; s/</I am groot\n/g ; s/,/I am grooot\n/g ; s/\[/I'm Groot\n/g ; s/\]/We are Groot\n/g" | grep -v '^$' |
This file contains hidden or 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
#!/bin/bash | |
# compile groot to brainf*ck | |
# "+" "i am groot" | |
# "-" "I am Groot" | |
# "." "I AM GROOOT" | |
# ">" "I AM GROOT" | |
# "<" "I am groot" | |
# "," "I am grooot" | |
# "[" "I'm Groot" | |
# "]" "We are Groot" | |
sed "s/i am groot/+/g ; s/I am Groot/-/g ; s/I AM GROOOT/\./g ; s/I AM GROOT/>/g ; s/I am groot/</g ; s/I am grooot/,/g ; s/I'm Groot/\[/g ; s/We are Groot/\]/g" | tr -d '\n' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment