Daily Shaarli
Today - February 24, 2026
Unix system administration commonly consists of repeating common and similar operations on different sets of targets. The notion of using, and stringing together, building block primitives such as cat, sort, strings, wc, sed and awk is a core tenet of Unix philosophy. //
By incorporating the data into the script itself, one can create powerful system administration tools, in the form of simple shell scripts, that consist merely of a single file.
The basic organization of such a script is a set of one or more data items which are commented out, as they are not actual commands, but commented in such a way that they can be distinguished from normal comments:
01: #!/bin/sh
02: #
03: # Here is the data set, and perhaps we will add some other comments here
04: #
05: ##DATA var1 var2 var3
06: ##DATA var1 var2 var3
07: ##DATA var1 var2 var3
As you can see, normal comments are commented out with one # character, but data items are commented with ##. Not only does this allow us the ability to parse through the script and easily identify which lines are data lines (as opposed to normal comments), but it also allows us to quickly disable a data line that we temporarily do not wish to use. Simply remove one of the # characters from the data line that is not to be used - it will not be parsed because it has no leading ##, but it still starts with #, and thus does not affect the script as it is still commented out.
The body of the script consists of a variable defining the path of the script itself (obviously the script needs to know the path to itself if it is to parse itself), and then a while loop that reads in every line of the script, but filters out (using grep) only those lines that are data lines, which begin with ##DATA :
08: myself=/usr/local/bin/script.sh
09:
10: while read line
11: do
12:
13: if echo $line | grep "^##DATA"
14: then
15:
16: var1=`echo $line | awk '{print $2}'`
17: var2=`echo $line | awk '{print $3}'`
18: var3=`echo $line | awk '{print $4}'`
19:
20: diff $var1 $var2 >> $var3
21:
22: fi
23:
24: done < $myself
What is happening here is that the script, in line 08, defines the path to itself, and uses a "while read line" construct, the end of which in line 24 takes as input the name of the script itself. ...
YAG (Yttrium Aluminum Garnet) is a synthetic gemstone created in laboratories, originally used for lasers and optics. But gem lovers quickly realized something:
color-change YAG is insane.
Its shift is often stronger than natural gemstones:
- Daylight: Deep blue-violet
- LED: Pinkish
- Incandescent: Intense red
Because it’s lab-grown, the clarity is perfect, and the color switching looks like turning on a filter in real-time.
It’s affordable, dramatic, and honestly one of the coolest synthetic gemstones ever made.