Shell script to delete a directory whose name is digit number?

The following solution removes directories that is a number or more shopt -s extglob rm -fr +(0-9) # use when directories are non-empty rmdir +(0-9) # use when you know the directories are all empty.

– user534009 Apr 25 at 15:58 it means extended globbing. It enables you to use +,? , etc. See the bash man page for more.

– ghostdog74 Apr 25 at 23:41.

You can use the shell expansion for that: $ mkdir 1 2 3 4 5 $ rmdir 0-9 See gnu.org/software/bash/manual/bashref.htm... for more information.

Delete all folders just containing digits in the current directory: for I in `find . -maxdepth 1 | grep "^. /0-9\+\$"`; do rm -rf $i; done.

Find can handle regular expressions using the parameter -name: find /current/dir -name "0-9". Take care when using rm -rf, you might delete something that you didn't wanted to delete. – evnu Apr 25 at 12:58 thanks for the hint ;-) – binfalse Apr 25 at 12:59.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions