I am reading a build command as so: mapfile -t make_out < <(2>&1 ./make.sh my_program) I would like to print the output kept in make_out only if t
Note: Question does not duplicate Ignoring specific errors in a shell script . Suppose it is needed to capture the leading characters of a encoded representati
I have this code snippet, which allows to overwrite a string in bash if used multiple times: echo -ne "String 1 \r" echo -ne "String 2 \r" Output: String 2
I've made an executable .jar file for a terminal game I've been working on. So far, I opened it by typing java -jar name.jar in the Terminal. This worked, but w
I have been executing my Golang code on Visual Studio in the terminal for the past few weeks. All of a sudden I am trying to run a program I made, and it does n
I have been executing my Golang code on Visual Studio in the terminal for the past few weeks. All of a sudden I am trying to run a program I made, and it does n
I'm running shellcheck on my scripts and often get this warning (which in this case is correct, because cd foo bar baz makes no sense): cd ${SOME_DIR} || exit 1
I am trying to write a script to monitor all the server ports. But I am able write to for only one connection at a time. How can I write it for all the connecti
I am trying to write a simple Bash completion script for a program that runs its arguments as a command. A good example of this is kind of program is the prime-
I use this shell script to count the lines of code in a Django project, find . -name "*.py" -type f -exec grep . {} \; | wc -l How can I modify this to not c
I read data from a json file with jq. I wanna append the results into a yaml file, but I dont get it working. I am quite new to shell programming. My goal is to
I am trying to write a python script that will execute a bash script I have on my Windows machine. Up until now I have been using the Cygwin terminal so executi
i want to rename different files in bash with pattern and found this option: rename 's/.2007/(2007)/g' *.* with this pattern I can rename every file with "
Currently I have this line in my .gitlab-ci.yml file: if (( $coverage < $MIN_COVERAGE )) ; then echo "$coverage% of code coverage below threshold of $MIN_COV
The shortest bash quine is the null string: $ bash -c '' $ What is the shortest non-null bash script which produces its own source code as output?
i have stuck code. i make bash script to send Notification If file Size changed #!/bin/bash #File Embeded test_file=/home/optimus/bot_test/dump.txt msg_captio
i have stuck code. i make bash script to send Notification If file Size changed #!/bin/bash #File Embeded test_file=/home/optimus/bot_test/dump.txt msg_captio
From this trivial example: $ x="ls output: " $ ls | while read line; do x="$x $line"; echo $x; done ls output: a ls output: a b ls output: a b c ls output: a b
I have a pretty simple script that is something like the following: #!/bin/bash VAR1="$1" MOREF='sudo run command against $VAR1 | grep name | cut -c7-' echo
I try to zip all folders in given directory. So I wrote this find /home/user/rep/tests/data/archive/* -maxdepth 0 -type d -exec zip -r "{}" \; but got zip e