Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 48650

Questions specific to GNU’s Bourne Again SHell, as opposed to other Bourne/POSIX shells. For questions about Unix shells in general, use the /shell tag instead.

7
votes
process; if it was in the current process, it could not possibly be backgrounded. It's easier, IMHO, to see this kind of thing with strace: sauer@humpy:~$ strace -f -etrace=process bash -c '{ sleep 10 … ; echo "Sleeping process", $BASHPID, $BASH_SUBSHELL; } & echo $BASHPID;' > /tmp/file execve("/bin/bash", ["bash", "-c", "{ sleep 10; echo \"Sleeping proce"...], [/* 20 vars */]) = 0 arch_prctl …
answered Oct 6 '13 by dannysauer
0
votes
If I'm understanding the question correctly, you want something like this: for D in ??? do [[ -d $D?* ]] || continue mkdir $D/$D for F in $D/* do cat $D*/$F > $D/$D/$F done done That …
answered Oct 11 '13 by dannysauer
0
votes
For a few more alternatives if anyone comes here again... Depending on the shell, you could probably use set -o errexit to have the parent shell exit when a command (including a subshell) exits non-z …
answered Oct 6 '13 by dannysauer
1
vote
. Assuming Bash or a shell that works similarly, you can either use jobs -r to get a list of running jobs and grep the job number out, or you can specify a process name in the jobspec (the thing after the … hello sauer@host:~$ jobs [1] Running sleep 10 & [2]- Running sleep 11 & [3]+ Running sleep 9 & sauer@host:~$ kill %sleep -bash: kill: sleep: ambiguous job spec sauer@host:~$ kill %"sleep 10" [1] Terminated sleep 10 …
answered Jul 26 by dannysauer