ICT: Diary
D: 28 W: 05
| < | October 2022 | > | ||||
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 | |||||
[ < ]
Wednesday, 12 October 2022 [ >
]
Shell Scripting
In shell scripting the checking a string is achieved using [ ${var} = "string" ], if you are writing bash scripts you can use == for the equality test, but this is a non standard extension.
os=`uname`
if [ ${os} = "Linux" ]; then
path=/usr/bin/
else
path=/usr/local/bin/
fi
Is an example of an if statement using this test.
$Id: dates.htm,v 1
$Id: diary,v 1.38 2025/01/01 22:43:54 fred Exp $