79463407

Date: 2025-02-24 11:44:11
Score: 4.5
Natty:
Report link

I am a rank amateur at this, but I am interested in this topic and tried to make a script to do the job, based on erik's answer. It seems to work, but I worry that I have made some rookie mistake here. Any suggestions? Thank you.

#! /bin/bash
echo "Enter the first directory"
read dir1
echo "Enter the second directory"
read dir2
cd "$dir1" 
find | sort > list1.txt
mv list1.txt "$dir2"
cd "$dir2" 
find | sort > list2.txt
diff list1.txt list2.txt
rm list1.txt
rm list2.txt
echo "All done"
read -rn1
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • RegEx Blacklisted phrase (2): Any suggestions?
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Gabriela Remow