At this point of the book, we know enough to write our own code, process variables, interact with the user, and the environment, many things altogether, and so we are ready to make a mess. We know how to write a bunch of lines, but we still do not know how to keep things clean and tidy and, moreover, how to make our code reusable. As we can easily guess from the examples seen so far, a script or a command line is a one way processed flow of code; the characters making up our commands are read from left to right, from top to bottom. So, when you pass a construct or an assignment, it is done and if you want to process something the same way you did before; you have to rewrite the code that carried on the procedure again. So, if you ...
Functions
Get Mastering Bash now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.