

bash alias to exit if no jobs suspended
source link: https://gist.github.com/J-Swift/889e5255137c1cf10bcb06b5fd428698
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

bash alias to exit if no jobs suspended · GitHub
Instantly share code, notes, and snippets.
function fge() { # https://unix.stackexchange.com/a/251050 local -r num_suspended=$(jobs -s | wc -l)
if [ $num_suspended -eq 0 ]; then exit else fg fi }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK