Special Shell Variables
As I always have a tendency to forget the special variables used in shell scripts, I am going to document down the variables here.
As I always have a tendency to forget the special variables used in shell scripts, I am going to document down the variables here.
At work, I have a couple of shell scripts to perform LDAP queries. Initially the scripts were hard-coded with the login credentials of a read-only user. But as the scripts were enhanced to handle LDAP query updates, I realised that it was not a good idea anymore to hard-code the username and password as I was just inviting trouble. And the scripts will be a big NO during system audit.
I have some shell scripts that will perform certain actions only on a weekend (Saturday or Sunday). There are two ways to solve the “is it a weekend” logic.
I have been looking for a tool to encrypt Ki
values (into eKi
) using AES encryption. Ki
is a 128-bit value used in authenticating the SIMs on the mobile network.
Linux has all the tools you need to generate a random password. This can be accomplished by a special file /dev/random
, that serves as a random number generator.
If you are planning to discard your old hard disk, make sure that they do not contain any valuable information when they head out of your door. The last thing on your mind is the potential of having your identity stolen from sensitive information stored in that hard disk.
To perform disk usage monitoring of users on a UNIX system, you will, first of all, need to determine the home directories of the users. You might ask, “Aren’t all the user home directories found under /home?”. Well, typically yes, but it’s not always true.