I am currently writing a compiler (http://curly-lang.org if you’re curious), and have been encountering a strange bug when trying to run the generated ELF binaries on the latest Linux kernel. The same binaries run fine on older kernels (I’ve tried on several Ubuntu boxes, uname 4.4.0-1049-aws), bu…
Tag: linux
1506-221 (S) Initializer must be a valid constant expression
In AIX during compilation of header file i am facing this issue. Header file (header1.h) has the structure like this: now in .c file including header1.h when i’m compiling the above .c file using xlc compiler it is throwing the error: header1.h”, line xxxx: 1506-221 (S) Initializer must be a valid…
How can I add a column of ascending numbers for each scaffold in my bed file
So I have a file like this, with each row representing a position in the scaffolds with some positions omitted. (There are actually a lot more rows for each scaffold): and ultimately i want to make 100kb sized windows for each scaffold separately (the last window on each scaffold would be less than 100kb).Thi…
ARM GDB cannot access memory only on Linux
Trying to switch development to Linux, but running into a (probably simple newbie) problem. On my Mac, I can use ARM GDB (arm-eabi-none-gdb from the GNU ARM Embedded Toolchain) to load my elf to my STM32L432, then at my breakpoints a simple i lo (or examine, or whatever) gives me the local vars. On Linux, how…
Can ethtool provide the current incoming bitrate on a NIC
Is there an option in linux’s ethtool command that retrieves the current incoming bitrate or packets-per-second straight from the NIC? Answer Not per packets-per-second, but overall RX/TX. You could write a script around it: ethtool -S <interface> For example currently on my wifi nice: The same in…
jq to remove one of the duplicated objects
I have a json file like this: I tried: but this will remove all the duplicated items, I,m looking to keep just one of the duplicated items, to get the file like this: Answer With field1, I doubt you are getting anything in the output, since there is no key/field with the given name. If you simply change your …
How to generate certificate request and private key files (.pem extension) from certificate file (.crt extension)
I have a .crt file. Opening up that file, I see that it starts with From this file, how do I generate these 2 files?: Certificate request file that starts with —–BEGIN CERTIFICATE REQUEST—– Key file that starts with —–BEGIN PRIVATE KEY—– Answer You can not. You …
Ubuntu FFMPEG dynamic image file name
I currently have a directory full of a variety of mp4 files, and I am currently able to loop through the whole directory and screen caps at every five second interval. Currently, the command names them starting at “00000001.png” and increments for the next screen cap, but I would like it to use th…
gcloud instance disk space
I am trying to do some computing on cloud. For this I created a computing instance and then I attached an external storage with about 10TB. But it seemed that I did something wrong and I got only 200GB available for my datalab. Any comment will be helpful To check this I used and Thanks. Answer As I can see
Global variables in header only library
I’m writing a header-only logger library and I need global variables to store current logger settings (output flags, log file descriptor etc.). My thoughts: I can’t declare variables as extern, as i don’t have access to the translation units to define them I can’t just define global va…