At the beginning of the course you started learning about the absolute necessities when it comes to
shell scripting.
You found out that it really doesn't matter what the final name of the shellscript is or what extension
it has if any.
The most important thing is its permissions and specifically the execute permission.
You learn how to add executable permissions to your scripts with the chmod command.
Once you started writing shell scripts you learned the importance of using a sharp bang on the very
first line of your script.
You also learned how to insert comments in your script you quickly started using variables to store
values in your script.
You use the echo shell built in to generate standard output including displaying the contents of variables.
You learned that using single quotes around a string makes it a literal string.
That means everything in the single quotes is displayed exactly as it appears in your shell script.
What do you want to allow for variable expansion.
You learned to use double quotes.
You learned how to use the type command to determine if a command is a shell builtin or a Linux command
to get help on a shell built in.
You use the help Shaad built in command for Linux commands you learn how to use and read man pages.
You also learned how to take advantage of some of the shell variables that you get for free when using
bash.
Some of the variables you've used included hostname random and you ID.
We talked about command substitution and how the dollar sign parentheses syntax is the current favorite
way to perform that command substitution while surrounding a command and back ticks is the older syntax
that you may still encounter from time to time.
You assign the output of commands to variables using this method as well as using the output of those
commands directly or as part of other commands.
Once you started creating scripts that had multiple steps and requirements you were introduced to the
concept of pseudo coding which is simply a high level description of what your script will do.
You then went back over your steps and filled in the exact commands and details required to make those
steps function correctly.
You also learn how to use an IF statement.
We talked about how you can use expressions in operator supported by the test built in between the double
brackets of the if statement.
We also talked about the older syntax of using single brackets for conditional expressions.
The use of the if statement brought us to exit statuses.
That's because the if statement was checking to see if an expression was successful or not before it
executed the appropriate code block.
When a command completes successfully it returns an exit status of 0 when it doesn't it returns a non
zero exit status.
You learned how to control the exit status of your scripts by using the exit shell built in.
You also learn how to check the exit status of the most recent command by examining the contents of
the variable dollar sign.
Question mark.
You use the if statement to perform some sanity checking.
Users don't always behave the way you want them to.
And systems are not always configured exactly the same if something is required for your script to execute
successfully.
You learn that you have to check for it when you started using multiple options to various commands.
We talked about how you can combine multiple single character options following just one hyphen for
most options.
The order doesn't matter so you can execute the same command in multiple ways and still get the exact
same result.
Also many commands give you the option of using a single character option or a longer version of that
option when there are two forms of the same options such as dash and or dash dash name.
You only need to use one of the forms.
By the way all the variations of the ID command you see here on your screen are equivalent and produce
the exact same output next to learn how to use the read shell builtin in order to capture standard input
and store it in a variable.
You then moved on to creating random data that you could use for account passwords.
One way you did this was by taking advantage of the random shell variable.
Another method you use to was to take the output of the data command and run it through a cryptographic
hash function you then started working with positional parameters.
You learn that arguments are what are supplied to your script and that parameters are what you use to
store those arguments inside of your script.
Not only did you learn about dollar $0 1 and so on.
You learned about a few special parameters such as Dollar Sign asterisk dollar sign and sign and dollar
sign pound sign because you can't always anticipate the number of arguments you use or may supply to
your script.
You use the for loop to loop through each of the positional parameters.
You also learn how to create while loops while the test returns true.
The code block between do and done will be executed.
This means that during a while loop you'll want to change the thing being tested for in some way so
that the condition eventually evaluates to false or you'll end up in an infinite loop.
Finally you learn how to fully manipulate standard input standard output and standard error by using
i o redirection.
One of the first forms of IO redirection you used came in the form of a pipe.
You took the standard output of one command and piped it as the standard input into another command.
You were able to start with some output and by making small changes to a series of pipes you were able
to put it in the exact format that you wanted.
Next you covered IO redirection to and from files you learned that using a single greater than sign
when redirecting will create a new file or overwrite the existing contents of a file if it already exists
in order to append to a file without overwriting it.
You use the double greater than sign syntax you redirected the contents of a file as standard input
into a command by using the less than sign.
You also learn how to send standard error to a file as well as how to send both standard output and
standard error to a file.
You continued working with pipes and learn how to send both standard output and standard error as standard
input through a pipe by using the pipe ampersand syntax in order to conform to the convention of sending
error messages to standard error you learn how to redirect standard output to standard error.
You also learn how to discard output by sending it to the nolde device.
I hope you realize how far you've come in a relatively short period of time.
At this point you could easily go off and write all kinds of useful shell scripts.
You know how to control the flow of your scripts you know about input and output redirection.
You know how to perform loops you understand many shell scripting conventions and on and on.
In short if you've completed this course you are so far ahead of most shellscript yours.
However I encourage you to keep learning and practicing.
Of course one of the best ways to do that is to use your skills to perform some real world work that
you need to get done.
Pick something that you need to automate or make easier be it something you do at home or at work.
Finally I want to congratulate you on completing this course.
It's so easy to start something yet so hard to finish it.
If you've made it this far.
Know that you're one of the few who see things through to the end.
For that I really respect you.
I wish you the best and I hope to see you in another one of my courses soon.