3

bash alias to exit if no jobs suspended

 3 years ago
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.
neoserver,ios ssh client

bash alias to exit if no jobs suspended · GitHub

Instantly share code, notes, and snippets.

bash alias to exit if no jobs suspended

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK