I have a bash script that executes some node commands (node file.js). If there is an error in file.js is there a way to stop it going onto the terminal?
I have tried exec 2>/dev/null before the command
I have just entered characters into the script to produce an error to show the type of error I want to hide.