Category Archives: bash
Use := to Assign a Default Value to an Unset Variable
You can change the value of a null or unset variable to its default in a script using the := modifier: ${name:=default} When the shell expands the expression ${name:=default}, it sets the value of name to the expanded value of … Continue reading
Performing a Join from the Command Line
The examples in this section use the following files: $ cat one 9999 first line file one. aaaa second line file one. cccc third line file one. $ cat two aaaa FIRST line file two. bbbb SECOND line file two. … Continue reading
What does dereference mean?
A symbolic link is a file that refers to another file (a target file) without pointing directly to the target file: It is a reference to the target file. To dereference a symbolic link means to follow the link to … Continue reading
The local Builtin
You can use the local builtin only within a function. This builtin causes its arguments to be local to the function it is called from and its children. Without local, variables declared in a function are available to the shell … Continue reading