shell symbols ?
In shell scriptings, what do or what does this symbol do or mean ? "."(octet), ";" (semicolon)? Would really like to know? Cause I saw a written script if [ -f /etc/file ];then. . /etc/file. Wondering, the "." is meant to be source, so is "." the same thing as "source" ?thank you.
|
Formatting the snippet using BBCode to make it easier to read...
Code:
if [ -f /etc/file ]; The if statement above simply checks that /etc/file exists and is a regular file, and if it exists, then it sources it. Hope that answers your query! :) |
Also, the ';' in that usage is redundant; a newline is sufficient to separate cmds for the parser.
http://rute.2038bug.com/index.html.gz http://tldp.org/LDP/Bash-Beginners-G...tml/index.html http://www.tldp.org/LDP/abs/html/ |
All times are GMT -5. The time now is 08:54 AM. |