While testing conditions it would be better to use double quotes as follows
If [ “$VAR” = “value” ]
So that if a blank value comes as the value of the variable VAR, it will not generate any error.

While testing conditions it would be better to use double quotes as follows
If [ “$VAR” = “value” ]
So that if a blank value comes as the value of the variable VAR, it will not generate any error.
We usually treat & as the address of variable. The same feature is incorporated in Unix as well. This is for redirecting the outputs from different operations.
For eg: ps >> /dev/null 2>&1
This is telling the kernel to put the error along with the normal outputs to the same file. &1 refers to the
filename that is referred for the standard output.
As we all know there is PATH environmental variable. And some paths will be defined for this. When we give a script name as such, the shell will search for this script name in those paths and if not found, the script will not get executed. This is why sometimes we get the error saying that the specified script not found. So to avoid this, either you add the pathname where your scripts resides to the PATH variable or run the job as ./ [ if your job is in the current directory where you are standing] or give the absolute path for running the job.
.
Damn good search engine…will get the results in different fashions even
grep -lR gives out the files having the searching pattern
grep -nR lists out the lines that matched
The most useful Command for me. Used it to search for a file that is last accessed modified or for a file whose path is not known to me
find -cmin -20 -> finds out the files last modified within last 20 minutes or lesser than that in the preset working directory
find -name “file” -> search for a particular file
Lot more options are available. Listed the 2 I most used.
Prints the strings of printable characters in a file.
I used this for a search in core files…
Can be used to explore the strings in a binary file