Author Archives: mark
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
Burn a CD/DVD ISO image file from the command line using wodim
Install wodim; its name is derived from Write data to Optical DIsk Media. This utility has many options; in a simple setup it figures out what you want to do and does it. To burn an ISO image file, first … Continue reading
Fun with hdparm!
The hdparm utility reports on and set device parameters. This blog explains a few of the hdparm options—see the man page for more options and details. CAUTION: You can wreak havoc on a disk with some hdparm commands. You can … Continue reading