shell script: delete all directories named directory.# except directory.N
What would be the easiest way in a script that can run in bash (and preferably ksh and csh too) to delete all directories named asdf.# (where # is 1, 2...10...100...1000), except for asdf.N where N is some number?
For example, if i have directories asdf.1 asdf.2 asdf.3, and i want to delete all but asdf.2
Thanks.
|