bash: keep output from 1st command while calling second command
I have a bash script that executes my_command_1
and then I do 2 things when certain stdout
lines are found from that command. First, I need to figure out an ID, and then use that ID for the second command my_command_2
.
How quotes in bash loop’s command affect control flow?
Seeing something that is making me question my sanity:
How set -e (set -o errexit) should behave in bash functions? My function is not terminated despite multiple unhandled (non-zero) errors inside [duplicate]
This question already has answers here: Why does behavior of set -e in a function change when that function is called in a compound command w/ || or &&? (2 answers) Closed 3 days ago. I’m really surprised by this behaviour of set -e (errexit) flag. I thought it will stop at any “unhandled” line […]
Delayed execution when using bash’s trap command?
I use the following .bashrc
code to display execution times per command:
Are these steps enough to put my bash script under GPL 3?
I have written a bash script I would like to put under GPL v3. I’ve read the GNU documentation
on How to Apply These Terms to Your New Programs and How to use GNU licenses for your own software. Still, I’m not quite sure what to put there and which artifacts are needed.
Do accompanying tools/scripts also need to be licensed to put my bash script under GPLv3?
This is some sort of follow up to an older question of me.
User Configuration of a Shell Script. Best practices?
I am writing a shell script with a few variables that should be configured by the user. There will be an installer for downloading and configuring the script, possibly by asking a series of question. The script in question is aimed at other developers.
False positives with honey pot script
I have a little BASH script that checks to see is a Password.txt file is accessed. If it is I get an email.
Heredoc or an external template file in my bash script – how it affects readibility/maintanance?
I realise that this question may be down to personal preference but I’m pretty new to Bash / shell scripting so thought it’d be worth some research to see if there’s some sort of standard/best practise or agreeable consensus.
A script to use to git fetch to see if git pull is needed then create new archive of directory
The script is to update a group of repos and archives .bz2 of each repo. That uses git fetch to check if git pull is needed, then after each git pull the script backs up the old archive and creates a new one.
I have got it working to a point. Currently it makes new archives, even if git pull has not run. I want it to stop if git pull isn’t needed and move onto next repo.