Bash Directory Sorting Issue - Removing Duplicate Lines?
问题 I'm using this command to merge multiple identical directories and to remove duplicate lines from each of the corresponding files: for f in app1/*; do bn="$(basename "$f")" sort -u "$f" "app2/$bn" > "app/$bn" done Is there a way to edit this so that it checks the lines of all the files and removes all the duplicates as well? I do need to keep the existing file structure with individual files. The end result creates a directory with 300 text files that's no larger than 30mb. Example: *