Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 3 years ago. Improve this question I wan…
Find files with a string in filename and unzip
I have a folder full to zip files. Using linux terminal, I need to find files with a certain string in the zip file name and unzip only them to another folder. I tried the following but no luck. First, the pattern is not matching and second, I am not sure if the output could be redirected to another folder.
Calling pppd within C program blocks the thread
I have a script which I call from within the C program. I do this before I start the threads as I need the ppp link up before these threads start. I do the below: I tried calling the script within a thread-1 like below: On the success of the script, I get below: After the above, no code beyond
For key and value in file json [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago. Improve this question FILE json I want to make a loop for and get the key and value Answer loooo…
How to make a “same response” server with bash?
I’m trying to set up a simple server that returns always the same response. Based on this question I’ve tried to use but on the client it shows only once. If I use the UDP option (-u), it works as intended. So I’m guessing it’s EOF’s fault. Is there a way to make it work as a rep…
How do I extract data from df ~ onto my website?
I am creating a pie chart which shows how much disk space is available/used on my linux box. However, I am unsure how to parse the data onto a microservice url. Help will greatly be appreciated. Here is what I have at the moment: Router: Controller: Answer You might try the approach below, we create a row obj…
yum check error when install package from source code
my server is centos 6.10, i install curl, libssh2, openssl, c-ares, python-urlgrabber from source code, and all these package run without any problems, but when i use camand yum check, i got error message: gnupg2-2.0.14-9.el6_10.x86_64 has missing requires of libcurl.so.4() rpm-4.8.0-59.el6.x86_64 has missing…
Doing an awk command for a conditional statement
I’m doing a bash script using the Awk command to format a file with some user info, and at the beginning of the script, I want it to say “if the value in column 1 is not in the format abc123, skip that line. It doesn’t seem to be working though. I had this previously: but of course that woul…
Is it possible to get current CPU utilisation from a specific core via /sys in Linux?
I would like to write a shellscript that reads the current CPU utilisation on a per-core basis. Is it possible to read this from the /sys directory in Linux (CentOS 8)? I have found /sys/bus/cpu/drivers/processor/cpu0 which does give me a fair bit of information (like current frequency), but I’ve yet to…
How to rewrite this multiprocessing code for Windows?
I’m currently using multiprocessing so I can obtain user input while running other code. This version of code runs on ubuntu 19.04 for me, but for my friend it doesn’t work on windows. How can I make this code work on windows? Also the user input lags behind by one input. If the user presses a but…