Skip to main content

Questions tagged [error-handling]

Use this tag for questions on how to handle errors generated in shell scripts.

2 votes
1 answer
155 views

When using the set -e flag in Bash, then it's difficult to get user-friendly error messages (a stack trace) and it's difficult to add cleanup code that executes before your script exits with an error ...
user3207874's user avatar
1 vote
0 answers
77 views

The other day something started going wrong with the perl rename terminal command that was pre-installed on my system; which is Ubuntu 22.04.5 LTS. When I try to use any version of the rename command ...
Danae Stephens's user avatar
0 votes
0 answers
29 views

I've seen questions about this topic, but they talk about constructs like if or ||. I don't understand why the same behavior seem to happen for substitution ($())? $ my_function() { echo "the ...
Jakub Bochenski's user avatar
1 vote
1 answer
114 views

I have a simple bash script that's supposed to create a dump file from a database docker exec -i container sh -c "mongodump --archive" > \ ~/dumps/db-$(date + "%d%m%Y").dump ...
Ambre's user avatar
  • 111
0 votes
2 answers
618 views

I have a script which logs in to a server. Regardless of the success (i.e. whether the password is valid or not) the script will exit with return code 0, and the text: Error login failed. I'd like it ...
Nickotine's user avatar
  • 554
1 vote
0 answers
94 views

Consider the following script: #!/bin/bash set -o errexit -o xtrace qux() { false echo QUX } quux() { qux ||: echo QUUX } quux Running this script produces: + quux ...
Azat Khabibulin's user avatar
0 votes
1 answer
163 views

I've had some issues with my XQuartz environment not starting due to a bit of a freak reason that was a rather hard to figure out. It's (mostly) working again but I must have caused another regression ...
RJVB's user avatar
  • 274
-5 votes
1 answer
86 views

My virtual machine stuck on this and just keep downloadin for hours please solve
muhammad wajahat ali khan's user avatar

15 30 50 per page
1
2 3 4 5
23