Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Extended the example of errors in use of ls #776
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
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.