Tag: Linux
-
Substitute last 4 digits in second and third column
10 I have a file as following: 2300 10 1112221234 111222123420231121PPPPD10+0000000850 ESIM 10 3334446789 333444678920231121PPPPD11+0000000950 RSIM 23 I want the outcome to be as following: 2300 10 1112222345 111222234520231121PPPPD10+0000000850 ESIM 10 3334447890 333444789020231121PPPPD11+0000000950 RSIM 23 I tried with the following code and was able to replace the last 4 digits in the second column and…
-
Why is the constructor of a global variable not called in a library?
8 I have some legacy code with some singleton classes that register themselves using constructors of global variables. It’s a large codebase, that’s compiled into one executable. I have tried to organize the code base and regroup code into libraries. A minimal example of the current code is main.cpp int main(int argc, char *argv[]) {…