Skip to main content
12 events
when toggle format what by license comment
Dec 13, 2017 at 17:40 history edited Stéphane Chazelas CC BY-SA 3.0
added 242 characters in body
Jul 19, 2017 at 4:37 comment added dave_thompson_085 bash 4.2 up has shopt lastpipe to change the pipe case in a script (to be exact when jobcontrol off): unix.stackexchange.com/questions/143958/…
Sep 10, 2016 at 18:41 comment added jimmij @Wildcard Because $BASHPID is special variable as manual explains: Expands to the process ID of the current bash process. This differs from $$ under certain circumstances, such as subshells that do not require bash to be re-initialized.
Sep 10, 2016 at 2:17 comment added Wildcard @jimmij, How can it be that $$ is expanded before the subshell is created, and yet $BASHPID shows the correct value for a subshell?
Jan 23, 2016 at 13:54 history edited jimmij CC BY-SA 3.0
added 623 characters in body
Jan 20, 2016 at 7:00 history edited jimmij CC BY-SA 3.0
added 576 characters in body
Dec 11, 2014 at 7:32 vote accept Minix
Dec 11, 2014 at 0:25 comment added jimmij @DanSheppard It is another process, but (echo $$) prints parent shell id because $$ is expanded even before subshell is created. In fact printing subshell process id could be tricky, see stackoverflow.com/questions/9119885/…
Dec 11, 2014 at 0:14 comment added Dan Out of interest, does this tend to actually be another process or just a separate environment in an internal stack? I use () a lot for isolating chdirs, and must have been lucky with my use of $$ etc if the former.
Dec 10, 2014 at 16:18 comment added glenn jackman Take careful note of the spacing in the man page: { and } are not syntax, they are reserved words and must be surrounded by spaces, and the list must end with a command terminator (semicolon, newline, ampersand)
Dec 10, 2014 at 13:43 comment added Minix Ah. Now to find all the places, where my predecessor used the wrong braces. Thanks for the insight.
Dec 10, 2014 at 13:38 history answered jimmij CC BY-SA 3.0