You are not logged in.
I'd like to be able to automatically kill my terminal window after I've issued a 'nohup foobar &' command to avoid window clutter. How can I go about this?
Last edited by anon27 (2010-11-17 22:57:42)
Offline
Just append "exit"?
nohup foobar & exit
You might put this into a macro as well:
bind '"\e\C-m":"\C-anohup \C-e & exit\C-m"'
Then just type foobar and press Alt-Return.
Or, if this is all you're using nohup for, you might use a function like this:
nohup () { command nohup "$@" & exit; }
Then just use 'nohup foobar'.
In general, if you want to start programs from bash but avoid window clutter, take a look at bashrun, too.
Offline
Lol thanks. Too newb to realize that 'exit' was something that could be appended just like that. Will look into your other suggestions as well.
Offline
Note that '&' will background the preceeding command, but will also syntactically separate it from the next command, similar to ';'. That's why you can "just append" the exit command here.
Offline