Skip to content

conditional check within makefile

I am updating makefile of the project where I need to perform different steps based on the customer or manufacturing build, I have written simple makefile as follows and with that I am seeing unexpected output, could someone help figure out issue with makefile. I am getting following output of the makefile Th…

Access the word in the file with grep

I have a conf file and I use grep to access the data in this file but not a very useful method for me. How can I just get the main word by search-term? I using: Print: I want: (without “export: “) How can I do that? Answer If you’re using GNU grep you can use PCRE and a lookbehind:

DMA Engine Timeout and DMA Memory Mapping

I am trying to use a Linux DMA driver. Currently, when I send the transaction out and begin waiting, my request times out. I believe this has to do with the way I am setting up my buffers when I am performing DMA Mapping. In Xilinx’s DMA driver, they take special care to look at memory alignment. In par…

copy file with spaces in to hdfs

I have a file with name DT2516%_date_cdfs 05-feb-2017.csv .I need to copy it into hdfs . I am using the following command. Hadoop fs -put DT2516%_date_cdfs 05-feb-2017.csv /tmp/ Error: put : Unexpected URISyntaxException How do I copy such files? Answer Here is what you can do

No activity on server with logging every 5 seconds

Recently I have notices that log files on my server grow faster than I was expecting. After a quick look I have realized that it is wtmp what aggressively is taking my disk space. Using utmpdump command (see below) I found out that every 5 seconds new 3 or 4 logs are recorded. There is no load on the server:

Detect if presence of a character in a string with Lua

I can have two types of string: nxs_flo_dev.nexus orfpdesk. I want to test if there is a . in the string. If there is a . I divide the string otherwise I do not do anything. Is there a function to do that? Because .contains() doesn’t work. Answer Use match again. Remember to escape the dot with %.: If y…