How to conceal a segmentation fault in a bash script
问题 I use a program that works properly and results in desirable output at the end of its operation with no memory leak or any other specific issue, but then it issues a segmentation fault at the point it exits. I have been trying to hide this harmless but annoying error from the end user when using this program by redirecting the standard error to Null: program options >file 2>/dev/null But this doesn't work and the error shows up in the middle of the script's outputs each time I run the program