-
Fundamental related of a bash builtin command named “if”
ABOUT if Conditionals have many forms. The most basic form is: if expression then statement where ‘statement’ is only executed if ‘expression’ evaluates to true. ’21’ evaluates to true.xs TYPICAL SHELL EXPOSURE [bash] $if true; then echo "works" ; fi works $if false; then echo "works" ; fi $ [/bash] LINK https://stackoverflow.com/questions/16034749/if-elif-else-statement-issues-in-bash http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-6.html
-
Fundamental of a bash builtin command named “unalias”
ABOUT unalias Remove each name from the list of defined aliases. If -a is supplied, all alias definitions are removed. The return value is true unless a supplied name is not a defined alias. [bash] $unalias unalias: usage: unalias [-a] name [name …] $echo $? 2 $unalias -a $echo $? 0 $unalias pwd bash: unalias:…
-
A look into the bash builtin command named “until”
ABOUT until until command in Linux used to execute a set of commands as long as the final command in the ‘until’ Commands has an exit status which is not zero. It is mostly used where the user needs to execute a set of commands until a condition is true. A TYPICAL SHELL EXPOSURE [bash]…
-
Sessions of bash builtin command named “times”
ABOUT times Print the accumulated user and system times for the shell and for processes run from the shell [bash] $times 0m0.063s 0m0.024s 0m0.008s 0m0.012s $times pin 0m0.064s 0m0.025s 0m0.008s 0m0.012s $times ping 0m0.065s 0m0.025s 0m0.008s 0m0.012s $times –help times: times Display process times. Prints the accumulated user and system times for the shell and…
-
Understanding bash fundamentals and also about return command
ABOUT return Causes a function to stop executing and return the value specified by n to its caller. If n is omitted, the return status is that of the last command executed in the function body. TYPICAL COMMAND LINE EXPOSURE [bash] $cat learn function e() { echo hello echo "10" } e value=e #echo $value…