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
Barcodes too wide in a GoDEX printer with CUPS in Linux
I have a GoDEX RT700i printer (203 DPI) and I want to print barcodes in Linux (Ubuntu 16.04) The barcodes I have are in PDF format. There is a 8 digit number below the barcode. In Windows, there is no problem with GoDEX drivers. The barcodes and the number are printed perfectly. Note: If I print the PDF from …
Quote a filename containing quotes and given as variable in Bash
Let’s say I have a directory path in variable DIR and I want to list this directory. If I care only about spaces in the path, then I could do What should I write if I want to support also single and double quotes and other weird stuff in the directory path? Example: Answer Quotes are not just for spaces
Multiple services to run on a container or multiple containers Docker?
I have a container with a Laravel application that is used for development. So I don’t use an apache image, only a php 5.6 one. The process that keeps the container alive from not stopping is and this is also the command that start start the Laravel application server. The application folder is mounted …
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…
Error when trying to deploy Qt application using shared libraries
I tried to deploy a qt application using the shared library approach described here: http://doc.qt.io/qt-5/linux-deployment.html (5th headline) When I go to my project folder and type “make clean” I get this error: “make: *** No rule ro make target ‘clean’. Stop” What is th…
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…
Angular2 AOT ngtools/webpack failed on linux
My project is building on Linux and I’ve no idea why. The distribution is Red Hat Enterprise Linux Server release 7.0. My environment is: When I build the application with ngtools/webpack with the following command: It fails at the end of the compilation, but as we can see in the log, it generates the d…
AWK usage issue while archiving HDFS files in Hortonworks Distribution
I am trying to move files in a HDFS directory that are over 3 days old to an archiving folder in HDFS. AWK Script: Note: cmd variable would have a mv command once this script starts working Issue: Value of variable X is constant Value of Variable Y is constant Unable to get day difference between 2 date , i