Skip to content

sed/awk to replace in a loop

I have a file called “demo” that has names in our DNS. I’m trying to loop through each line and replace the “names” with “names and ip address” (as a way of verifying dns queries) So far I have this but no luck on sed or awk command. Help appreciated. Thanks. demo &#8…

VS2017 Linux C++ threads issue

I have been testing the VS2017 Linux C++ with remote debugger on Linux Ubuntu. I have created a few example projects for C++ and everything has been working great until I got to threading examples. I cannot seem to get the threads to compile as I keep getting “undefined reference to `pthread_create’&#82…

How to see system call that executed in current time by process?

Linux utility “strace” show the list of syscall that started after run of strace. How I can see syscall that run in current moment by process? before start of strace. Answer proc offers some information about what the kernel is currently doing “for” a process /proc/${pid}/syscall /proc…

Stream data for users

I want to build a server that could stream data from multiple endpoints simultaneously for analytics purposes. Scenario: users registered on our platform will provide credentials of their IoT device. E.g https://stream.example.com/user1 & https://stream.example.com/user2 Our responsibility is to monitor t…

Because one line of unrelated code, the speed difference so much

Why use the precompiler to add a line of code, the speed change is so great? ubuntu@host:~/test_intersection$ g++ -std=c++11 -O3 -DLINUX main1.cpp -o main1 ubuntu@host:~/test_intersection$ ./main1 duration: 62080 microseconds,set a size: 2998917 set b size: 3000000 set result size: 2087 ubuntu@host:~/test_int…