Last active
March 30, 2017 10:24
-
-
Save SnoringFrog/b5003bc9d985dfbd900e to your computer and use it in GitHub Desktop.
Stupid Shebang Tricks - Various stupid things you can do by using the shebang to select unconventional interpreters.
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
Various stupid things you can do by using the shebang to select unconventional interpreters. |
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
#!/usr/bin/env touch | |
This file just touches itself when you try to make it do anything. |
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
#!/usr/bin/env cat | |
Prints its own contents when executed; ergo, it is always a quine. Could also be done with less/more/dog. | |
This one could be slightly useful in some situations (small documentation files and readmes?) |
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
#!/usr/bin/env echo | |
This just prints its name whenever it's called. |
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
#!/usr/bin/env yes | |
This just prints its name endlessly whenever it's called. |
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
#!/usr/bin/env rm | |
This file deletes itself if you run it | |
In other words, it dies if you execute it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment