I have a directory with a few sub-directories. I’d like to create a copy of each results.csv file in the same directory named results_cleaned.csv where certain lines will be removed. Each sub-directory is known to contain only a single file, results.csv. Running this on a single directory works: However…
Tag: linux
Copy Gitlab repositories to another Gitlab server through filesystem
I had a gitlab server of 7.6.2 version with some repositories. Now this server was upgraded by newest Ubuntu and it has an empty gitlab server of version 12.0.1. I also have a HDD backup from old gitlab server. I need to move all repositories from old gitlab server to the new one. I tried to copy .git reposit…
/proc/meminfo not updating when reading from ssh script
I have the following script in bash: I have my host PC and a target PC which I am copying to. Before I run this script I have already scp’d a big file into /tmp on the target. When I run this script it copies the file /tmp/big ok, but when it enters the loop to sync the flash and
Recover informations from CSV files with my awk script
I have this CSV files : I create a little script that allow me to recover the informations from my csv and to place them like this : My script is : But the result is : Or I want : Can you tell me why my script doesn’t works and why floats are not taken into account ? Thank
What is the difference between closing [close(3)] and clearing [fd_clr(3)] a file descriptor?
I am having problems with an automated software testing, which is blaming use of freed resource when I use fd_clr(3) after using close(3) in a fd. Is there something wrong with doing this? Answer FD_CLR() only changes a local fd_set, which is a C data structure to store info about a list of file descriptors. …
Indirect expansion returns variable name instead of value
I am trying to set up some variables using indirect expansion. According to the documentation I’ve read, the set up should be simple: I should be getting “12345”. Instead, the output is “varname”. If I remove the exclamation point, I end up with “qa_ci”, not “12…
Where to find the max resolution for a touchscreen monitor in Linux?
The application that I’m writing has a thread that is constantly polling a /dev/input/eventX location for touch events since the Linux kernel I am running has limited support for touchscreens. Because of this limited support, QT5 does not receive any touch events, and I have to parse the raw event data …
How to get values for ipi_ifindex for sendmsg()?
Using sendmsg() it is possible to specify from which interface a datagram will be sent, if a value is set for in_pktinfo.ipi_ifindex. If the packet is a response to a datagram received with recvmsg() I can get the interface value from there. If I just know that the interface if ‘eth0’ or ‘en…
Linux/ALSA: Callback when frame is written to sound card
I’m new to sound programming and ALSA. I’d like to create a little application, that for example prints out to the console when a frame of data is written to ALSA with snd_pcm_writei(…). Is that possible and if so, how? Currently I’m thinking of registering a callback to ALSA so when a…
Ubuntu compiling kernel module first time
I’m trying to compile a simple kernel module for the first time: I’ve used obj-m += hello-1.o (that’s the name of the module) but i’m getting an error: obj−m: command not found Why is this happening? I tried looking online for a solution, but nothing I found helped.. EDIT: After modify…