I am not really a specialist in this topic, so please excuse possible hiccups in formulating the question. We are running two programs under Windows, Zemax and Matlab, where Matlab controls Zemax via .NET COM interface. (The fact that it’s Zemax is not critical for this question, it’s just to be s…
Bash script to list all processes in the foreground process group of a terminal
How can I write a bash script to print out the PIDs of all processes in the foreground process group of a given terminal (which is different from the one in which I run the script)? I know that the C function tcgetpgrp can do the job, but I am wondering if there exist any command line utilities that can
ssh does not return even after execution
The following ssh command does not return to terminal. It hangs though the execution is completed. The execution hangs after echo hi command. Output ciInstallAndRun.sh Source OS: Redhat Dest Os: Solaris 10 8/07 Any idea to fix this. Answer Any idea to fix this. Your installation script has spawned a child pro…
Change output filename when running a command in a loop
I am using the Tracer software package (https://github.com/Teichlab/tracer). The program is invoked as followed: tracer assemble [options] <file_1> [<file_2>] <cell_name> <output_directory> The program runs on a single dataset and the output goes to /<output_directory>/<cell_n…
SFTP via Paramiko to ipv6 linux machine
I am relatively new to python and am trying sftp for the first time via python script. I want my python script to get a file from a Dual Stack Machine (Both IPv4 and IPv6 present). Below is the code snippet I am using for Paramiko: When I use the code with IPv4 it works fine. But when I replace
can’t upload file to wordpress
I move my wordpress website to my vps with Cpanel, after move every thing is working well, but my media option can’t upload file to my library, I try to set permission for uploads folder and subfolders to 755,775 even 777 but media uploader get me this error : The uploaded file could not be moved to wp-…
bash ls output to file when ls finds no results
i’m relative new to scripting in bash, and made the following script: At the end of the script, i don’t make a new MLSready file. When i execute the script, i expect to see the result of the latest ‘ls -l’ command in my logfile, however (because i didn’t create a new MLSready fil…
python writing list to text file result in different lengths
i have 2 lists of strings with the same length but when i write them to a file where each item appear on separate lines in the file, they length of the list and file do not match: However when i write each item in the list to a text file: the number of lines in the text file do
Environment variables from .bashrc not being loaded when sourced from terraform script
I have a script being run with terraform on an EC2 instance like so: I have some environment variables defined in the .bashrc of this instance that I would like this script to have access to. However, inside that script I put, as the first line, but the variables defined in .bashrc were still unset. What do I…
Reading in kernel second time overrides first instance
I have written a read function to read a file into buffer in Kernel space. Now, this function works really well and I am able to read contents of filename into buf by calling this function from my system call Then, I am calling this function again to read contents of secondfile into secondbuffer. The problem …