Sometime Today, Nadeem M. Khan assembled some asciibets to say:
cd dir1 for i in *; [ ! -e ../dir2/$i ] && mv $i ../dir3; done cd ../dir2 for i in *; [ ! -e ../dir1/$i ] && mv $i ../dir3; done cd ../dir3 ls
Shouldn't there be a do before the [ in each case?
yes.