Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
Tag: linux
linux c get system date format yyyymmdd
I want ask some questions 1) I want get string yyyymmdd of system date using linux c how should I do it ? And I want use this string do some arithmetic, like I have “20160317” I want do 20160317 – 90 get a new date,pls help 2) is there some cleaner way to do this? like if m =
Packaging RPM, avoid creating .rpmnew file
I’m packaging some of my own software, as part of the installation I need to drop some config files in a directory that’s used by a 3. party. To avoid overwriting configuration that have been locally changed, that file is marked as a config file like so in the RPM .spec file: The issue is that upg…
linux connect to remote sybase and backup/dump
I am on a CentOS machine and connected to a remote Sybase service through freetds/isql. I have no problem connecting to the remote database through isql. I’d like to dump the database to my localhost (my CentOS machine). From the isql prompt, I cannot do this with the ‘backup database’ comma…
How does linux clean up threads when process exits if they’re really just processes under the hood?
My understanding is that threads and processes are really the same entity on Linux, the difference being in what memory is shared between them. I’m finding that it’s…difficult to ensure that child processes are properly cleaned up without explicit communication between the parent and child. …
script for deleting queues using a certain prefix
i have a file named “Output_File.txt” containing a list of local queues and i want to write a script to delete those queues. what i wrote is: the problem is that the script does delete the queues but prints for every deleted queue the following output: how can i alter the code to delete the queues…
Bash script runs one command before previous. I want them one after the other
So part of my script is as follows: In my output I see: Whereas when I ssh to the server, xyz.log does exist within ~/a/b/c/ Why is the grep statement getting executed before the echo statement? Can someone please help? Answer The problem here is that your command in backticks is being run locally, not on the…
Some terminal commands run via Java don’t display output in Linux
I’m trying to write a Java program to run terminal command. Googling and SO got me to here: So far, so good. The problem is if I try to run a command like “python -V” via String[] cmd = {“python”, “-V”}; The program will run, but no output is actually printed out. Any…
Python, using basic unix command and list of hosts
I am trying to get the output of a list of hosts, using the unix command nslookup + the list of hosts, but I am getting an error although it does work when I only have one host. Is there an easier way to do what I am doing or can you help me fix this simple script? My script
what does a if mean during variable assignment
I am going through a couple of BASH scripts. And I came across something like this Apparently the Variable VAR_S should not be empty and I am trying to wrap my head around this statement. What does if=${MY_FILE} mean here. I am trying to figure out why VAR_S is returning empty when I echo it.It seems to me li…