I have 2 servers. Server A is where I have scripts that download html files from websites and then insert those texts into a MySQL server that its on server B. Server B, at least for now, is just for Writing to MySQL, we dont read (select) to that server. Data is downloaded using a PHP Script and another PHP
Tag: linux
How to grep recursively and ignore subdirectories of subdirectories?
I am already familiar with grep -r “searchTerm” . and I am familiar with grep -r “searchTerm” exclude={subdir1, subdir2} . However, I am looking for a way to grep recursively, through subdirectories and ignore certain subdirectories of subdirectories. For example, if the directory stru…
Split string in ksh
I got a string as follow : What would be the best way to convert it in seconds without using date ? I tried something like this that sounded pretty nice but no luck : Any idea is welcome, I just can’t use date -d to make conversion as it is not present on the system I am working on.
Purpose and usage of GPIO-Hog declaration
Questions What is the purpose and use-case of the gpio-hog declaration? Can a ‘hogged’ gpio pin be interfaced with from Userspace? If a ‘hogged’ gpio pin cannot be interfaced with from Userspace, then is there any mechanism to configure GPIO pins in the dts file for Userspace interacti…
In Java 8, how do I get my hostname without hard-coding it in my environment?
We just upgraded to Java 8 on Amazon Linux. We are using Spring 4.3.8.RELEASE. It used to be that we could get our machine hostname by setting up beans in our application context file like so … But with Java 8, the bean “hostname” now contains the string Before Java 8, it used to contain the…
Building OpenSSL and LibCURL from sources (Ubuntu) with undefined references
I’m trying to port a .dll project from Windows to Linux and I need to build OpenSSL and cURL STATICALLY. For this, I’ve tried to compile zlib as well but I get some errors I can’t figure out how to solve. I didn’t use sudo except for zlib’s $ sudo make install (since I installed …
How to uninstall RPM without dependencies error in cent os?
I installed the openssl rpm some long days ago. After that i am unable to uninstall the rpm so that i deleted the /usr/bin/openssl folder manually.Though I deleted it manually, when i grep using this command rpm -qa openssl i can find the rpm. But when i execute the openssl command in terminal it is showing b…
Duplicate static variable initialization in C++
I build a shared library “libMyLibrary.so” with a class “MyClass” that contains a static variable of type “MyClass”. Then I build an executable “MyLibraryTest” that I link against “libMyLibrary.so”. The main program uses “dlopen” to load …
nohup “does not work” MPIrun
I am trying to use the “nohup” command to avoid killing a background process when exiting the terminal on linux MATE. The process I want to run is a MPIrun process and I use the following command: when I leave the terminal, the processes running on the different cores are killed. Also another thin…
How to access python return value from bash script
I’m trying to understand how to access from a bash script the return value of a python script. Clarifying through an example: foo.py start.sh If I run the bash script, this prints the message “exec main..”. How can I store in script_output the return value (execution ok)? If I direct executi…