Additive color mixing begins with black and ends with white; as more color is added, the result is lighter and tends to white. The RGB colors are light primaries and colors are created with light. Percentages of red, green, & blue light are used to generate color on a computer screen.
In shell scripting we often need to check if file or directory exists and take appropriate action. This post show you how to check it and how this check use in your script. For checking we will use file test operators -f for file and -d for directory, which return TRUE if file or directory exists. And here is output of the script.
environment variable contains the exit status of the previous program. So to check the exit status, we could write the script this way: In this version, we examine the exit status of the. command and if it's not zero, we print an error message on standard error and terminate the script with an exit status of 1. While this is a working solution to the problem, there are more clever methods that will save us some typing.