Created
May 20, 2019 17:49
-
-
Save vbarbarosh/673d5a3dd200aae1b8dfa7603adf9288 to your computer and use it in GitHub Desktop.
shell_bash_jobs_fg – Using fg command https://codescreens.com
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
| #!/bin/bash | |
| # http://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin | |
| # http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
| set -o nounset -o errexit -o pipefail | |
| # Using fg command | |
| # https://www.gnu.org/software/bash/manual/html_node/Job-Control-Basics.html | |
| # Enable job control. Otherwise, `fg` will yield "fg: no job control" | |
| set -m | |
| docker run --rm adminer & | |
| # Some other commands... | |
| # Pressing Ctrl-C is enough to termiate docker process | |
| # https://docs.docker.com/config/containers/multi-service_container/ | |
| fg %1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment