Skip to main content
added 23 characters in body
Source Link
user218374
user218374

That is because the backgrounded process runs in a subshell. To do what you want you could do this:

LOGFOLDER="$LOGFOLDER" bash -c 'node process.js 1>$LOGFOLDER.$$.log' &

That is because the backgrounded process runs in a subshell. To do what you want you could do this:

bash -c 'node process.js 1>$LOGFOLDER.$$.log' &

That is because the backgrounded process runs in a subshell. To do what you want you could do this:

LOGFOLDER="$LOGFOLDER" bash -c 'node process.js 1>$LOGFOLDER.$$.log' &
Source Link
user218374
user218374

That is because the backgrounded process runs in a subshell. To do what you want you could do this:

bash -c 'node process.js 1>$LOGFOLDER.$$.log' &