I am writing a small script to easily capture weights, which are taken from user input with read -p. I want all captured weights to be 4 characters long, decimal numbers in the format XX.X. For example 30.2 kg. How can I make sure users can only input decimal numbers in that format? Thank you for your help. A…
Rails task not running unless rails runner has been executed in the command prompt since the linux server machine’s bootup
I’m trying to execute this task to update a large amount of data from a controller so that when an administrator user accesses this method it will run the said task. I’ve confirmed that there aren’t any issues with the task itself, but I’m not so sure about the way it’s being cal…
Resubmitting DMA Engine transactions
I’m writing a custom high-speed Linux SPI driver for an embedded SoC. To send data to the SPI peripheral (DMA_MEM_TO_DEV) I’m the Linux DMA Engine API. https://www.kernel.org/doc/Documentation/dmaengine/client.txt Based on the documentation, the steps for setting up and executing a DMA transaction…
Linux script to check if DNS have the same IP like the one next to it in the same list
I’ve got a list of DNS and IP adresses in this format: DNS IP DNS IP DNS IP And I need to do a script which do dig +short DNS and check if it has the same IP as the one next to it, and that with all the document. The idea is that if it’s the same, it returns
Estimate Core capacity required based on load?
I have quad core ubuntu system. say If I see the load average as 60 in last 15 mins during peak time. Load average goes to 150 as well. This loads happens generally only during peak time. Basically I want to know if there is any standard formula to derive the number of cores ideally required to handle the giv…
TYK Dashboard and Gateway Environment Variables Usage
i’m using licensed version of TYK Dashboard .So i need the change configuration of TYK Configs. So at this link at the here https://tyk.io/docs/configure/dashboard-env-variables/ I’ve wanted to use environment variables at launch time of VM . But these are not working on my machine (on-premis). I …
How to get fully interactive bash terminal in C with shift + ctrl keys?
I want to know how to create a fully interactive terminal. I am creating an interactive bash terminal like this: I can then go on to use read()/write() to send commands and receive output. My problem is how do I automate CTRL & SHIFT keys? Python’s subprocess does this so it’s definitely possi…
Creating a new user interactively on a remote machine
I have function as such: Which leaves the terminal hanging. I have had success using the -tt flag previously to execute a few commands with EOF interactively, but I can’t seem to create a new account interactively on my remote server with the above script. This works fine, allowing me to set a password,…
Why I get an error when I try to execute a command remotely?
I have a problem about execute command remotely via SSH. I am trying below. It gives an error like: Answer The problem is that you’re using double quotes to delimit the argument to ssh and also the argument to psql inside the command. This is causing your strings to be parsed incorrectly. You’re a…
Failing to install R oligo and RCurl packages on Linux CentOS 7
I am trying to install the Bioconductor oligo R package on my laptop where I have Linux CentOS 7. It cannot be installed through the common Bioconductor installation commands because it says that RCurl was installed for anoter Rversion and needs to be reinstalled. I tried to install it through the command: in…