Skip to content

escape one variable but not the other in awk

I’m facing a problem with awk in Linux. I would like to do make this script work : The problem here is that I want the variable “var” to be interpreted (it works) and the variable $OTHERVAR not to be interpreted, and this I what I can’t manage to do. In the end, I want to do this: I ha…

Why Sed cannot replace lines that contains . + and *

I have a large file and some of the lines are as follows: I want to replace ….+UNKNOWN part with the …+PUNCT To do that, I did the following: However, none of the lines gone. I couldn’t find my error, could you help me about ? Answer In some versions of sed, + has a special meaning, use + to

Compare different columns of subsequent rows to merge ranges

I have a list of ranges, and I am trying to merge subsequent entries which lie within a given distance of each other. In my data, the first column contains the lower bound of the range and the second column contains the upper bound. The logic follows: if the value in column 1 is less than or equal to the

crontab (cronie), run certain days of the month

I want to make a crontab entry which will run on every weekday except the 1st, 2nd, and 3rd of each month. Here’s what I have: I thought that this had the following meaning: That is what I read in the crontab(5) manual page. However, I can see that the job ran at 08:45 today, Monday 2nd October. I am

SQL Server on Linux : Data source name not found

I followed the instructions to install Sql server natively on my machine which runs linux mint sonya based off ubuntu xenial. Ive had no trouble installing the service: When trying to connect the the DB, i get this error: Answer Turns out after all that I did not install the unixodbc-dev package. The error me…