If not it will print 'File does not exist' and exit with error code 1.īash quotes (single and double) are evaluated in pairs. [ -f &2 exit 1) will check if the file exists. || ( statements to evaluate if condition is false )Į.g. & ( statements to evaluate if condition is true ) You can declare local variables within a bash function using the keyword local Variables The results of a command can be assigned to a variable using backquotes
0 Comments
Leave a Reply. |