Skip to content
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

Merged
merged 6 commits into from Feb 16, 2017
Merged

Conversation

parththaker
Copy link
Contributor

Adding a new challenge to check files using.
Adding possible solution using md5sum

Copy link
Contributor

@0ki 0ki left a 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

@jarv
Copy link
Owner

jarv commented Feb 6, 2017

Agreed, it is a good example but you should use diff here.

@mwek
Copy link

mwek commented Feb 6, 2017

Why not use cmp file1 file2?

@parththaker
Copy link
Contributor Author

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

Copy link
Contributor

@0ki 0ki left a 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.

@jarv
Copy link
Owner

jarv commented Feb 9, 2017

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?

@0ki
Copy link
Contributor

0ki commented Feb 9, 2017

@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.

gitunique and others added 3 commits February 12, 2017 16:43
* 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.
@parththaker
Copy link
Contributor Author

@jarv : I have updated the challenge to include your comments. Are the changes as expected?

@jarv
Copy link
Owner

jarv commented Feb 16, 2017

Looks better, thanks! I will merge it and might make some tweaks before putting it live on the site. Thanks for the contribution.

@jarv jarv merged commit 7cc5409 into jarv:master Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants