after

Echo a string after process dies
git clone _git@git.zakaria.org/after.git
Log | Files | Refs | README | LICENSE

commit 62f8a5794075422148841f7dfcb3af6ebc73e7a2
parent fb98389a6c47b39896cc0da05a591f55df122912
Author: e-zk <58356365+e-zk@users.noreply.github.com>
Date:   Tue,  5 Jan 2021 17:18:57 +1000

readme: it is manpage

Diffstat:
MREADME | 53+++++++++++++++++++++++++++++++++++------------------
1 file changed, 35 insertions(+), 18 deletions(-)

diff --git a/README b/README @@ -1,29 +1,46 @@ -after -===== +AFTER(1) General Commands Manual AFTER(1) -After the specified process dies, echo a string. (OpenBSD specific). +NNAAMMEE + aafftteerr – after process dies echo a string to standard output -Usage ------ +SSYYNNOOPPSSIISS + aafftteerr [--hh] [--vv] [--pp _p_i_d | --nn _p_r_o_g_r_a_m___n_a_m_e] --ee _s_t_r_i_n_g - after [-h] [-v] [-p pid | -n process_name] -e string +DDEESSCCRRIIPPTTIIOONN + aafftteerr watches the process list for the given _p_i_d or _p_r_o_g_r_a_m___n_a_m_e. When + the process is no longer in the process list aafftteerr outputs --ee _s_t_r_i_n_g to + standard output. If both _p_i_d and _p_r_o_g_r_a_m___n_a_m_e are specified aafftteerr will + default to watching the process specified by _p_r_o_g_r_a_m___n_a_m_e. -The process to watch is specified `-p pid' or `-n process_name'. After this -process dies the string specified by `-e string' will be printed to standard -output. + In the case of using _p_r_o_g_r_a_m___n_a_m_e if there are multiple programs with + this name running all of them will have to exit before aafftteerr will echo + _s_t_r_i_n_g. -Examples --------- +OOPPTTIIOONNSS + --pp _p_i_d Watch _p_i_d. -The following are some examples to illustrate how after can be useful (or not). + --nn _p_r_o_g_r_a_m___n_a_m_e + Watch _p_r_o_g_r_a_m___n_a_m_e. -Notify yourself when your build is done: + --hh Show usage information. - $ after -n gcc -e "build is done!" + --vv Be verbose. -The power of this simple tool can be observed when it is piped into other -programs. For example, putting your machine to sleep after your update jobs -finish: +EEXXAAMMPPLLEESS + Following are some examples to illustrate how aafftteerr could be useful (or + not). - $ after -p 2027 -e "doas zzz" | sh + Notify when your compiler has finished running: + $ after -n clang -e "build is finished!" + + The power of this simple tool can be observed when the output is piped + into other programs. For instance; putting your machine to sleep after + your update script has finished running: + + $ after -p 2027 -e "doas zzz" | sh + +SSEEEE AALLSSOO + kvm_getprocs(3), kvm_open(3) + +OpenBSD 6.8 January 5, 2021 OpenBSD 6.8