SyntaxFix
Write A Post
Hire A Developer
Questions
You can execute a subshell and redirect all output while still putting the process in the background:
( ./script.sh blah > ~/log/blah.log 2>&1 ) & echo $! > ~/pids/blah.pid