Skip to content

Using variables on grep –q doesn’t produce founds

I need to extract entries from a log file and put them on an errors file. I don’t want to duplicate the entries on the errors file every time that the script is run, so I create this: And is run using: The first time that the script runs it finds the entries, and create the errors file (there are

strace -c does not show correct seconds

I have got results for strace -c on RHEL 7 and RHEL 6 for this command: and I don’t understand why the seconds column for nanosleep is equal to 0. I had expected it to be 20. Here is a full strace report: And there is a call to nanosleep in a detailed report: So seconds must be 20, not

Bash sort -nu results in unexpected behaviour

A colleague of mine noticed some odd behaviour with the sort command today, and I was wondering if anyone knows if the output of this command is intentional or not? Given the file: We are looking to sort the file with numeric sort, and also make it unique, so we run: The output is: Now, we know that the numer…

Check the parameter already in server

How to check the already set parameters in Linux/Oracle. For example, as soon as I login to Linux if I type cd $AU_TOP, it directly goes to the path set in AU_TOP. Now I want to see like AU_TOP what are the other parameters is there. Answer If typing cd $AU_TOP take you to some directory – Means you hav…