New answers tagged background-process
27
votes
Run two scripts after each other in the background? && and & don't work?
That's one of the known deviations¹ of zsh compared to sh (or csh for that matters).
In sh:
A && B &
is short for:
(A && B) &
That is, it runs a subshell that runs that and-...
8
votes
Run two scripts after each other in the background? && and & don't work?
You have to group the two commands together:
nohup sh -c 'a.sh; b.sh' &
Replace ; with && if you want b.sh to run only if a.sh exits with success
0
votes
Accepted
How to pass the standard input of a shell script to a background command
Yes, that's an annoying requirement of the POSIX sh specification that commands started asynchronously by non-interative shell invocations (when the monitor option IOW job control is not enabled) have ...
Top 50 recent answers are included
Related Tags
background-process × 625bash × 203
shell × 125
process × 107
shell-script × 94
linux × 53
jobs × 48
nohup × 46
command-line × 41
job-control × 38
kill × 37
ssh × 36
terminal × 36
process-management × 28
signals × 27
zsh × 20
io-redirection × 20
scripting × 18
daemon × 15
ps × 14
pipe × 13
python × 12
disown × 12
parallelism × 11
ubuntu × 9