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

Clarification of longest.sh script solution #1014

Open
SoftwareMonk opened this issue Aug 16, 2019 · 1 comment

Comments

@SoftwareMonk
Copy link

commented Aug 16, 2019

In the 6th episode, Shell Scripts, the solution to longest.sh doesn't provide an explanation on why it works. I think the ending of the script (tail -n 2 | head -n 1) might be confusing to some so it might be nice to explain that we use that set of commands instead of just tail -n 1. Some people may forget that wc shows a total at the end.

@gcapes

This comment has been minimized.

Copy link
Contributor

commented Aug 19, 2019

Yes, this could benefit from a breakdown of the solution. I usually find asking learners to run the first command, then build up the pipeline by adding add one pipe at a time helps to clarify what is happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.