I want to make a shell script that checks if an environment variable has been added, otherwise.
if [ ! echo $PATH | grep "/what_i_want_to_add" ]; then # If there is no environment variable
export PATH=$PATH:/what_i_want_to_add
fi
If possible, I would like to discard the output using /dev/null.
what should i do?