I knew there were some tools already for doing this but I wanted to write a script myself (as an exercise)
Thanks for you help guys. Eventually the basename command would do the trick but I kept it out of the script as it would not very usefull if you don't really know where those duplicate files are.
|