Created
October 22, 2013 11:05
-
-
Save akesterson/7098724 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [akesterson@ec2-54-242-78-15 ~]$ cat test.sh | |
| #!/usr/bin/bash4 | |
| function printpid() | |
| { | |
| echo $$ | |
| } | |
| echo $$ | |
| for i in 1 2 3 4 5; | |
| do | |
| (printpid & ) | |
| done | |
| [akesterson@ec2-54-242-78-15 ~]$ bash test.sh | |
| 12852 | |
| 12852 | |
| 12852 | |
| 12852 | |
| 12852 | |
| 12852 | |
| [akesterson@ec2-54-242-78-15 ~]$ bash --version | |
| GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu) | |
| Copyright (C) 2005 Free Software Foundation, Inc. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment