romach
7/19/2017 - 12:35 PM

Run command in background

Run command in background

# output stdout and stderr to the same file
./a.sh > somefile 2>&1 &
# output stdout and stderr to separate files
./a.sh > stdoutfile 2> stderrfile &