rm out1.txt rm final.txt perl dir.pl > out1.txt #tells the flags repeated uniq -d out1.txt > final.txt #tells uniq flags uniq -u out1.txt >> final.txt