Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- topdir=$(realpath "$1")
- orig_path_dir="$topdir-orig_path"
- tmp_dedup_dir="$topdir-tmp_dedup"
- find "$tmp_dedup_dir" -type f | while read -r unnamed_file ;
- do
- namefile="$(basename "$unnamed_file")"
- namefile_path="$orig_path_dir/$namefile"
- mv -v "$unnamed_file" "$topdir/$(cat $namefile_path)"
- done
- rm -r "$orig_path_dir" "$tmp_dedup_dir"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement