I run this in bash:
sudo ./my_script.sh arg1 >& result.log
And I'm getting this:
-bash: result.log: Permission denied
if result.log doesn't exist. However, I don't want it to exist before I run a script and want it to be created. How can I fix that?