Hi everyone
I've been trying all day to find out how to do the following and I'm having no luck. Any help would REALLY be appreciated.
I have a bash script that generates a log file, taking sar measurements at regular intervals in an endless loop. How can I assign a shortcut key that will call a function that I have written to do some cleen-up tasks before terminating. Control-c terminates my shell but, obviuosly, no clean-up is done. My function is quitter() and i've trieed the following, which doesn't work:
bind -x '"\C-q":quitter'
Thanks
Grant
I've been trying all day to find out how to do the following and I'm having no luck. Any help would REALLY be appreciated.
I have a bash script that generates a log file, taking sar measurements at regular intervals in an endless loop. How can I assign a shortcut key that will call a function that I have written to do some cleen-up tasks before terminating. Control-c terminates my shell but, obviuosly, no clean-up is done. My function is quitter() and i've trieed the following, which doesn't work:
bind -x '"\C-q":quitter'
Thanks
Grant