I am trying to install Anaconda with a sh script. I am using Ubuntu 18. Here is my Downloads folder. We can clearly see the script But running it gives a “command not found”. What could be the issue? Answer You can see from the permissions -rw-rw-r– that it is not executable. If you do: then…
Bash regex for same sender and receiver with backreference
I try to make a regex (important that ist a regex because i need it for fail2ban) to match when the receiver and the sender are the same person: What am I doing wrong ? Answer You might use a pattern to match the format of the string between the brackets with a backreference to that capture. Explanation from …
Why is kill -2 not killing the process?
EDIT: From my tests, it seems not to be possible to terminate a process with the SIGINT/SIGQUIT signal from a script. I do not know why though. I am working on Centos 7, with bash. I would like to know why isn’t kill -2 $pid killing the process. I have a master script that starts a subprocess. That subp…
How to manage file or folder permissions between two user accounts on Linux
There are two users: the user jenkins and the user nginx (both are actually the service accounts). First, the user jenkins creates the directory frontend in the /usr/share/nginx/html folder. Then it downloads some html files saving them in this folder. Then the user nginx tries to open one of the html files a…
Failed to install
I was trying to install gospider and other tools,I get this error I tried to update sudo go get -u all as in here but it runs forever. Answer If strings.ReplaceAll is undefined that means you’re using a version of Go prior to 1.12, which is when that function was added. To install that package, you need…
bash extract version string & convert to version dot
I want to extract version string (1_4_5) from my-app-1_4_5.img and then convert into dot version (1.4.5) without filename. Version string will have three (1_4_5) or four (1_4_5_7) segments. Have this one liner working ls my-app-1_4_5.img | cut -d’-‘ -f 3 | cut -d’.’ -f 1 | tr _ . Would…
How can I fix this “undefined reference” error using G++ and CPLEX?
I apologize if this is not the correct community to ask this on, in that case, please tell me which one is. I tried some IBM forums but I get a (general?) error when I try to start a thread there. I am decently experienced with CPLEX (on Windows, with visual studio c++), but when I try to compile the
Running address of an application, followed by heap and stack expansions
I have an m.c: and an a.c: I compile and build these as: Then, I examine the executable, linux thus: objdump -drwxCS -Mintel linux The output of this on my Ubuntu 16.04.6 starts off with: start address 0x0000000000400540 then, later, is the init section: Finally, is the fini section: The program references th…
https “bindings” in Linux with XSP4 server
I’m sitting with a bit of a interesting situation. I have a customer that want to try and host their ASP.NET WebAPI from a Linux server. Obviously setting this up on Windows is reasonably straight forward, but I’ve gotten stuck at the point where one needs set up the “bindings” for the…
Linux SocketCAN behaviour of recvmsg
I’m writing a CAN logger program. The way I log the data is similar to the way the candump-tool is doing it when invoking candump like candump any: https://github.com/linux-can/can-utils/blob/master/candump.c candump any makes candump bind to any device, i.e. addr.can_ifindex = 0; then it uses recvmsg t…