Ok, so as this is a learning process the best thing to do is run the command at the command line and confirm the output
is as expected. So step by step would be:
1. perform "cmp a One" (without the quotes) on the command line and check that it does compare.
2. once the above has finished, issue the following: echo $? (this will show you what the return value would have been)
3. if all the above as expected, instead of using for loops, try passing 'a' and 'One' as arguments to the script instead of directory
so code to mimic command line above is: (this goes in the current script with the rest remarked out)
4. from there you should then be able to piece your program back together.
Let me know if you get stuck or if the above is confusing?