I'm trying to save the output of nettop from my terminal to a text file ( maybe .csv ) what I want to do is be able to isolate the different v
I'm looking for a way to remove the indentation of a piped text. Below is a solution using cut -c 9- which assumes the indentation is 8 character wide. I'm loo
I have 2 files file1 and file2. Inside file1 I declare a var, x=1. In file2 I make a var x=2. If I run file one then file two, and then in the shell echo x, I g
Character substitution in all possible combinations I have string as follows, XGXXGXXGGXXGXXGX I would like to iteratively substitute X's for either one, two,
I am trying to write a shell script that can read a json string, decode it to an array and foreach through the array and use the key/value for replacing strings
I want to define an environment variable in Databricks init script and then read it in Pyspark notebook. I wrote this: dbutils.fs.put("/databricks/scripts/i
Some years ago I used the following bash script to get a video out of mp3's and one image (so the image in the video was freezed over the length of the mp3), wh
In Bash, I'm trying to make a function getLock to be used with different lock names. function getLock { getLock_FILE="${1}" getLock_OP="${2}" case
I would like to make a short script that will eventually run a quiz. I'm trying to read stdin, which contains a new-line delimited list of words, for example: v
I want my c# application (which I execute on a raspberry pi) to run a bash script whenever it starts.. basically : the script is located in /etc/init.d and is n
I know that if I do print ("f" + 2 * "o") in python the output will be foo. But how do I do the same thing in a bash script?
I need to capture error conditions in a Bash script using a trap. For this reason I've both set -e AND set -u in my script. However I've noticed that the trap
I have a file containing a value which should go into a field of a PostgreSQL table. By searching a little, I found many answers, e.g. How can I update column v
I have a script that checks if the PPTP VPN is running, and if not it reconnects the PPTP VPN. When I run the script manually it executes fine, but when I make
I'm working with GWAS data, My data looks like this: IID,kgp11004425,rs11274005,kgp183005,rs746410036,kgp7979600 1,00,AG,GT,AK,00 32,AG,GG,AA,00,AT 300,TT,AA,00
Problem: Cannot create topics from docker-compose. I need to create kafka topics before I run a system under test. Planning to use it as a part of the pipeline,
I installed python environment by means of commands: SYS_INSTALL="apt-get install -y" PIP_INSTALL="pip install" # Be sure to install setuptools before pip to
The original Data looks like ID,kgp11274425_A,kgp11274425_HET,kgp5732633_C,kgp5732633_HET,rs707_G,rs707_HET,kgp75_T,kgp75_HET 1,C,T,G,T,C,A,0,0 2,C,C,T,G,A,A,G
I have a shell script file like this: #!/bin/bash CONF_FILE="/tmp/settings.conf" #settings.conf contains OS_NAME="Caine Linux" source $CONF_FILE display_os_n
I have a c++ executable named Test. I want to find out the GetExitCodeProcess() code when the execution is completed. I can find out the status code by writin