Skip to content

Tag: linux

results of ls in one line when the output goes to a file

ls returns files in a line when it connects to stdout. when it redirects to a file I realize the option -C However, when a list of files has many, ls puts carriage returns in the list. like How can I have Answer I don’t know if ls provides an option for that and I haven’t looked it up. Since

Unable to use SED command [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question i want to call a shell scripts which has sed command in it to format the xyz.csv generated b…

BUILD_BUG_ON_ZERO not working in a simple user space application

I tried to use BUILD_BUG_ON_ZERO in a simple user space application and it is failed to compile Can anyone please provide me hints on the error. Answer The macro BUILD_BUG_ON_ZERO is intended to be used with a constant expression as defined in 6.6 constant expression. i isn’t a constant expression &#821…

How to embed data in shared library?

For example, I want to embed dicmap.bin to a shared library libxxx.so. I write a program to verify it. But its _start, _end and _size is invalid. end-start and size should be sizeof dicmap.bin (198600798). My objcopy is binutils-2.30-54.el7 of rhel7 with devtoolset-8. I try to add share flags to the .o file, …