This is a fun and silly Bash script that randomly moves around the directory structure and tries to hide itself in a random subdirectory.
-
Make the script executable:
chmod +x catch-me.sh
-
Add this to your
.bashrc
:function cd_and_catch() { cd "$@" ./catch-me.sh 2>/dev/null } alias cd='cd_and_catch'
-
Run the script for the first time:
./catch-me.sh
Enjoy the chase!
To enable debug mode, set the DEBUG
variable to 1
at the top of the script:
DEBUG=1
In debug mode, the script will print additional information about its actions and will not actually move itself.
This project is licensed under the MIT License - see the LICENSE file for details.