It appears that yum’s dependency resolution behaves differently depending on whether it is invoked from the RUN statement of a Dockerfile, or from docker run. Consider this Dockerfile: The docker build fails on the last command. The full output is included below, but basically yum selects packages for b…
Bash scripting for create array from file and use each value on a curl URL
I am working on a bash script and I got a list of IP’s that I wanted to add one by one in a CURL command. For example given list on a file named list.txt I wanted to add each value on curl command Where $ARRAYVALUE is the IP address to be used on the command. I will appreciate any
How to find encapsulating function name from line number
I am looking at a log file which just tells me the filename and the line number inside that file that has the Error. What I am interested is knowing the encapsulating function. For example, here are the contents of the log file and here are the contents of the file foo.file Based on the above log file, I want
Where is ssize_t defined in Linux?
OS: Debian 9 (Linux 4.9) Compiler: GCC 8.2 Currently I am including <stddef.h> (where size_t is defined) and <stdint.h> (where most integral types are defined), but I still don’t have ssize_t. Where is it defined? Answer ssize_t is defined in sys/types.h. Per the POSIX documentation: NAME sy…
Why is stat::st_size 0 for devices but at the same time lseek defines the device size correctly?
I noticed that when I query the size of a device using open + lseek, everything is OK, but when I stat the device, I get zero instead of the real device size. The device is clean without any file system and the first bytes of device start with some text like “1234567890ABC”. What is wrong? The cod…
shell script to change directory to the tail result path
I’m using Tail to an error happen on the log lines like: and this gives results like: So what I do manually is to change the path using cd: Is there any script to change directory automatically? As I run another manual script to change file names for the files contained in /003217899/, those like /00321…
Creating a new file from a cpp program in Ubuntu [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 3 years ago. Improve this question How do I create a new file from a cpp program in Ubuntu, and is it any different from window…
Looking to remove a set of characters from a .txt file
I am looking for a way to remove the content from one .txt file based on the other. For example, I have a file.txt with 2000 character that are random and not sorted. I have another file importantfile.txt with 2016 characters that have the same characters that file.txt has as well as 16 other characters rando…
Email pipe script runs as nobody instead of real user in postfix [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
Linux readelf shows object sizes with different numeral system (Hex and Dec)
I’m investigating some objects inside ELF file and using readelf for that purpose. This sample of readelf shows the size (bytes) of the objects on column 3, On large objects, readelf prints in Hex instead of dec, This breaks my size sorting attempts. (sorting ignores hex value) I tried translating all h…