Created
November 22, 2025 11:03
-
-
Save LightningStalker/db671d48d19dbe9fb249ff586bd24fa8 to your computer and use it in GitHub Desktop.
make you directry disappear
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 | |
| if [ -d "${1}" ] | |
| then | |
| echo -n 'dirshma.sh: ' | |
| rename -v 'y/ -~/0/' "${1}" | |
| until | |
| echo -n 'dirshma.sh: ' | |
| rename -v 's/0//' 0* | |
| rmdir 0 2> /dev/null | |
| do | |
| : # nothing | |
| done | |
| echo dirshma.sh: ${1} goed away | |
| exit 0 | |
| elif [ -v ${1} ] | |
| then | |
| echo dirshma.sh: no arg | |
| else | |
| echo dirshma.sh: ${1} no exist or no is direcotry | |
| fi | |
| exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment