Skip to content

Tag: linux

Using awk to parse and transform the following log

I have a log like this: I want to parse this log file and get all the following lines: Then I want to transform those lines into the following format for plotting: Here is my awk code: The thing I don’t like for this solution is: I must count manually the index of tokens generated by awk. I prefer a

How to deploy files to /boot partition with Yocto

I’m trying to deploy some binary files to /boot in a Yocto image for RPi CM3 but it deploys them to the wrong location. The files are deployed to /boot in the / partition of the final image, but not to the /boot partition. So they are not available at boot time. I already googled and studied the kernel …

Why is MAP_GROWSDOWN mapping does not grow?

I tried to create MAP_GROWSDOWN mapping with the expectation it would grow automatically. As specified in the manual page: MAP_GROWSDOWN This flag is used for stacks. It indicates to the kernel virtual memory system that the mapping should extend downward in memory. The return address is one page lower than t…

How to split a single XML file into multiple based on tags

I have an XML file that have tags. I want to split files like this. Below is the code tried . But it is generating every single line into a new file I want to split this file based on ORDER tags alone as mentioned below Answer With any awk in any shell on every UNIX box: it’s obviously fragile