Expect Debug Mode Enable/Disable
If you want to debug your expect program, just add the code below at the very top of your program. #!/usr/bin/expect -d Notice the -d at the end of the.. read more
If you want to debug your expect program, just add the code below at the very top of your program. #!/usr/bin/expect -d Notice the -d at the end of the.. read more
In case you wonder what version of HP-UX you are running, the command to use is uname. Here’s the syntax. uname -r The output will be something like this B.11.31
One of the important things to do in setting up a VPS or any Linux webserver is to NOT use the root user after the initial setup. The reason is.. read more
Suppose you have the ip address but need to get the hostname (ip name), you can use the commands below. Windows Syntax nbtstat -a [ip address]
I hardly know scripting commands in DOS/Windows Console so I struggle everytime I encounter situations when I need to use them. Case in point is searching for text in files… read more
How do we exactly count the occurrence of a particular character in a string in bash scripting? Well, there’s quite a number of ways of doing this. Here’s the simplest.. read more
Our internal audit team has raised an issue on some scripts exposing database user, password and tns. You see, all you need is an access to unix shell and run.. read more
In case you are looking files using ls or find command and only want to get the first file found, the command would be like. ls -l /any/path/filename*|sed -e ‘s///,/g’|awk.. read more
Apparently, there’s no native shell command to show the seconds portion of a unix file timestamp. The nearest to this functionality is stat. However, it’s not always available in unix.. read more