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

Extended the example of errors in use of ls #776

Open
wants to merge 1 commit into
base: gh-pages
from

Conversation

Projects
None yet
2 participants
@richardbeare

richardbeare commented May 10, 2018

to illustrate the difference in form of output when the errors come from bash
(caused by a typo) compared to when the errors come from a program (caused
by incorrect arguments).

Extended the example of errors in use of ls to illustrate
the difference in form of output when the errors come from bash
(caused by a typo) to when the errors come from a program caused
by incorrect arguments.
@shwina

This comment has been minimized.

Member

shwina commented May 29, 2018

Thanks for the contribution. This is certainly interesting, but could it be explained further? Why are there two sources of errors, what does it really mean if there are two sources of errors, and how can it help the user debug?

@richardbeare

This comment has been minimized.

richardbeare commented May 30, 2018

I'm unsure of the process here - I can add extra explanation but was worried about adding too much. I suspected that the best way was to leave the instructor free to comment. Should I add amend the commit with some more detail?

@shwina

This comment has been minimized.

Member

shwina commented May 30, 2018

@richardbeare

Thanks! Sorry for not being more clear! My above comment was just a few questions for you about this contribution. Before you add any more commits, let's just discuss what could possibly be added/changed to this contribution.

@richardbeare

This comment has been minimized.

richardbeare commented May 30, 2018

My general thought was to highlight how important it can be to read error messages carefully - something that beginners often need some guidance in doing effectively. In this pair of examples the difference to highlight is the

-bash

prefix to the message, indicating that error is being issued by bash, where as

ls: illegal option -- 

Indicates that the error is being issued by the ls program. In the first case the error means that bash can't find something, and thus an incorrect name has been typed (in this case because we missed the space). In the second case bash has correctly found the program, executed it, and the program has decided that something is wrong with the input arguments. Thus we'd be looking further along the command line for the source of error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment