I would like to export the stdout and stderr of a bash command to the same text file.
The bash command is a single-line command that calls python3 followed by the name of the module and function, followed by three arguments (each using --).
The bash command is running on an HPC as part of a slurm job.
python3 -m module.function --Arg1 Val1 --Arg2 Val2 --Arg3 Val3 I tried the following but it failed. It assumes that 2> or > are extra information to the last argument.
python3 -m module.function --Arg1 Val1 --Arg2 Val2 --Arg3 Val3 2> Output.txtpython3 -m module.function --Arg1 Val1 --Arg2 Val2 --Arg3 Val3 > Output.txtHow to be able to export the output to a file without making large changes to the syntax (I need to keep using a single line command for calling the function from the module).
Thanks