So I want to verify the exit code of a specific command
runuser -s /bin/bash @user_name -c $command > /dev/null 2>&1 &
How can I find whether the command runuser -s /bin/bash @user_name -c $command
executed correctly?
I tried using $?
but it doesn't work because it is always 0 ( the result of redirection is 0)
How can i find the exit code of that command ?