I have the following code: I compile it with nasm -f elf64 1.asm and link it using ld -dynamic-linker /lib/ld-linux-x86-64.so.2 1.o -o 1 -lc. When I execute the binary, I get printf() doesn’t always fail when I call it in assembly code. Removing printf() calls from printax and printbx gives me Update: T…
Undefined symbols for architecture x86_64: “_read_line”, referenced from: _insert in inventory-82371b.o
Here is the callback with -v and warnings suppressed. Here it is without warnings suppressed. But I don’t believe that they are causing the issue. Here is the code. It is a program for a very simple data base from a text book. I truly believe my problem is with the compiling. It’s been a while sin…
How to get 2 strings between certain characters in bash
String: I want to grab everything before the first instance of | and everything between External_SOC and ;PCRF. And store them as 2 different variables if possible. This gives me the following: 40125512ALPHA3 Answer EDIT: As per OP it needs to be done in a single line creation 2 of variables if this is the ca…
Replace every second instance of word in each line of the file
I’m trying to replace every second instance word of each line with sed. For example: If I had a line as below should be replaced as below. Only second instance of word is replaced with kiran/. My attempt : Output: My Question: Please help me with the proper sed or any Linux command which does the above …
How to deploy .net core in Kubernetes?
Recently I started study Kubernetes. And I want to deploy .net core in Kubernetes. How to deploy .net core in Kubernetes ? Maybe there is a simple example ? Answer There are lots of resources on the web for the specific mechanics that I will add at the bottom. This is a very broad question and probably not a …
Open pdf file created in a docker container(Alpine)
I am trying to open pdf file that I created inside a Docker container. I tried using xdg-open and Firefox but I’m getting the following errors: I don’t know what to do. Please help. Answer Copy the pdf out of the alpine container with docker cp alpine:/path/to/pdf . and open it on the host.
bash script to auto run on boot, make screen, execute a command and detach
I am using Centos 7 and on boot I would like to: Make a screen Execute a command: osrm-routed –algorithm=MLD ~/osrm-backend/profiles/australia-latest.osrm Detatch from screen (possibly not needed, just as long as I can access it myself after its running in future) Here is something I have thought about,…
How to list filenames containing a specific string
I’ve been searching for commands that would print the list of filenames that contain a specific string, regardless if the string is part of a bigger string. So for instance, say there’s a directory with files “DABC.txt”, “ABC.txt”, “ABC”, and “CDA.txt̶…
Getting only hexa decimal byte values from the disassembly of a compiled library
I have used objdump to disassemble all the functions in a compiled library file and written the output to a text file. In the text file the output of function called clear_bit is as follows. The output of an another function set_bit is as follows-: Similar to the above two functions, this output.txt contains …
Will process load into memory with 4 or 8 alignment rule
I just learnt about 4 or 8 memory alignment and came about this question. Will Memory alignment happen in virtual memory space or absolute addresss? I guess the answer is virtual memory space, and the os will load the process to the position that the absolute address ends with ‘0X00’ or ‘0X0…