Category "bash"

npm install -g truffle install visual studiosVsCode

I'm trying to follow this video and I think I'm doing something wrong, this is what is appearing in my terminal: .

Bash script to send commands to remote ssh session

Is it possible to write a bash script that opens a remote node (i.e. through ssh and/or slurm) and starts an interactive session there after running some comman

How to concatenate variables and strings as a full path for the "output file" of an ffmpeg command in a bash script

I'm trying to learn to bash scripting and I tried to use variables and arguments, etc. to specify a complex output file name to a ffmpeg command as follows : fo

WSL, Running linux commands with "wsl --exec <cmd>" or "wsl -- <cmd>"

wsl -h shows the following: --exec, -e <CommandLine> Execute the specified command without using the default Linux shell. -- Pass the remainin

Align around a given character in bash

Is there an easy way to align multiple rows of text about a single character, similar to this question, but in bash. Also open to zsh solutions. What I have: aa

Iterate over a csv and change the values of a column that meets a condition

I have to use bash to iterate over a CSV file and replace the values of a column that meets a condition. Finally, the results have to be stored in an output fil

Firebase app distribution via Fastlane "the server responded with status 403"

I setup Firebase app distribution feature in Fastlane Fastfile to distribute beta version of my iOS app. It was working fine but It suddenly started showing err

Generate a Random Output from the List of Multiplicities of a Number X up to a MAX Number Y?

Using a bash script, I want to choose a random number from such a list: [0, X, 2X, 3X, 4X, ..., Y] where Y=k*X and k is an integer. X and Y are just some input

Standard Deviation from multiple files in bash

I wish to calculate the standard deviation from a range of files titled "res_NUMBER.cs" which are formatted as a CSV. Example data includes 1,M,CA,54.9130 1,M

Trying to display different colors through bash script

I'm new to scripting and have decided to learn with this homework that I gave myself. The goal of this script is simply: display available colors in color pick

Conditional splitting of a HUGE file

I have a really huge file (>500 million lines) that I want to split in several smaller files according to the first 3 characters of one of its columns. It l

Change indented multiline string in file in terminal

i want to change multiline string within particular marks that is indented in file, example looks like this: non_important_array: [ text ], impo

Can I pass a string variable to jq not the file?

I want to convert JSON string into an array in bash. The JSON string is passed to the bash script as an argument (it doesn't exist in a file). Is there a way o

Can I pass a string variable to jq not the file?

I want to convert JSON string into an array in bash. The JSON string is passed to the bash script as an argument (it doesn't exist in a file). Is there a way o

How to get the length of the sum of audio files using sox?

I have a script such as following DIR=$1 ls $1 |sort -R |tail -$5 |while read file; do soxi -d $1$file done and it gives me an output like 00:40:35.18 00:4

PowerShell script to SSH to Multiple Linux devices and restart/reboot them

I am comfortable with writing single queries. I am new to writing bash scripts trying to automate the daily stuff. I need help on creating a PowerShell or bash

Start a docker container from bash script and execute commands on it

I am having a problem running Fenics using their docker container: Background to this is: One main VM communicates with the user via a REST API and gets one or

How can i count number of directories in current folder?

I want to count the number of directories in each folder it traverses. If a number of folders are equal to one, continue traversing, else select the current fol

Bash - check if repository exists

I am trying to create if statement which will check if repository with name X exists, if it doesn't => create it. Made following code. It works, but when rep

execute a shell script from different folder in Python

I'm not a pythonist, just need to fix some script. So I'm want to run some Bash shell script that placed not in the same folder as the Python script but in one