
Good day, habrasoobschestvo!
For me it has always been a problem to waste time waiting for the completion of long commands, especially compiling source codes. Either you are sitting and waiting, watching the console, or doing something else, in the process of which you safely forget that something very important must end in a minimized terminal.
')
And recently, during the next wait for the end of the assembly, I wrote a wrap script with the expert help of a good friend of mine, who now helps me not to lose time in such cases
Homepage
The script page is located
here . There you will find instructions for installation and use in English. In this article I will describe briefly in Russian.
Using
Using the script is very simple. It is necessary to write wrap before the command, for example:
wrap very_long_operation
wrap wget example.com/very_big_file.tar.gz
wrap tar -zxf very_big_file.tar.gz
wrap cp something_big somewhere_far
wrap make
The script checks the exit code of the running command and notifies you of either success or failure.
Installation
1. Install the notify-send program (in Ubuntu, this is package libnotify-bin).
2. Download and distribute the archive
http://bitbucket.org/artemb/wrap/get/tip.tar.gz .
3. Run install.sh as root.
UPD: I forgot to tell you about alias. You can define in your ~ / .bashrc aliases for traditionally long commands (wget, scp, mvn, etc.) of the form
alias scp = "wrap scp"
Then you can use wrap'om without explicit reference to this.
DISCLAIMER: My script does not pretend to anything. If for you it is inconvenient or useless - do not use it. In any case, I will be glad comments.