New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new challenge 'check_if_same_files' #102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
md5sum is not a correct way to see if files are the same. use diff in your example, please.
also, for the files itself I suggest using these files so that md5sum actually gives an incorrect result: http://02.lv/f/2017/02/06/md5coll.zip
Agreed, it is a good example but you should use diff here. |
Why not use |
I thought one can complete this required task by using all three diff, cmp and md5sum. I did not take into consideration the case highlighted by @0ki . Will make the required changes. Thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to go.
I am holding off on merging this for now as I am not sure I like echo'ing the text depending on whether the files are different or not. Maybe something more general like out of a set of files find the ones that are different? |
@jarv: I think it makes sense to have a challenge that teaches to show explicit output of a process result. Yes, echo $? is the bash way, but when doing the final action it makes sense to display result verbosely, especially if script is left running overnight or it's a cron script. |
* Added two new challenges. The first related to advanced file display, the second to navigating nested directories. * Added hidden directory and corrected symlink * Finalised pull request * Removed hidden directory (from challenges and challenges.yaml) as difficult to sync via git * Added file to hidden directory so I can commit it * Made description of list_files_adv more specific * Updated nested_dirs description as requested
* In cases where running commands was timing out due to server issues commands with tests would fall through and pass. Now we will throw. * Use a random script name so you don't see it when commands fail.
4e1005a
to
419b7b2
Compare
@jarv : I have updated the challenge to include your comments. Are the changes as expected? |
Looks better, thanks! I will merge it and might make some tweaks before putting it live on the site. Thanks for the contribution. |
Adding a new challenge to check files using.
Adding possible solution using md5sum