restore_original_names.sh 204 B

12345678910
  1. #!/bin/bash
  2. for i in $(find . -mindepth 1 -maxdepth 1 -type d -name "[0-9][0-9]" -o -name "[0-9][0-9][0-9]"| egrep -v '^./01$'); do
  3. source $i/ofn.txt
  4. mv -v $i "$ORIGINAL_DIRECTORY_NAME"
  5. done