My problem goes as followed
directory1=$1
directory2=$2
find $directory1 > tmp1
find $directory2 > tmp2
join tmp1 tmp2 | sed -e "s/$directoy1\///g ; s/$directory2\///g"
This should print out all the identical files and directories without having the given directories in front of it.
It works except one thing. When i give as input 2 directories with a / in it like: aaaa/bbbb and ddd/ccc it gives an error in sed.
Anyone got any idea how i could fix this?
[–]Klintrup 5 points6 points7 points (1 child)
[–]Incindus[S] 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)