A: 

I believe your error message is written on stderr. You need to redirect it to /dev/null.

./sim_program 2>/dev/null

+1  A: 

That error message is probably going to stderr.

Try putting this at the start of your script:

#!/bin/bash
exec 2> /dev/null

and anything send to stderr will go to the null device rather than your terminal.

ewalshe
Thanks, that worked! :)
Karl Yngve Lervåg
A: 

Thank you for answering! This does not solve the problem, though. As far as I know, >& will redirect both stderr and stdout.

It seems like the error message I want to suppress comes from somewhere else than the sim_program, perhaps even from the parent itself. No matter how I redirect the output from sim_program, the error message I want to lose remains printed to screen.

Karl Yngve Lervåg
That's because the error message you see is generated by the bash script rather than by your simulation program.
ewalshe