bew / dotfiles

All my dotfiles in one place!
43 stars 3 forks source link

bin: `after-do` to run a command after time or existing pid #71

Open bew opened 3 years ago

bew commented 3 years ago

after-do --pid 1234 -- echo bar after-do --at 'now + 5m' -- echo bar

FIXME: as a bin? or as a shell function? (start with the shell function?)

I got inspired when reading the existence of the at command in https://www.linuxjournal.com/article/1189 (in the 2nd half).

and maybe the --pid variant could be useful to wait for an already running process and do sth after it! (might need to use 1s polling)