future_turtle

joined 1 year ago
[–] future_turtle@sh.itjust.works 7 points 8 months ago

Hanging transparent “jewelry holder” for the hall closet. Instead of a box/drawer, I now have 80 little pockets for all the various adapters, connectors, and small cables

[–] future_turtle@sh.itjust.works 2 points 9 months ago

You probably want to make a launcher script. An easy start would be to background your main process and route the output wherever you want. Run your monitor loop and send the output wherever you want. Then you can examine and kill the main background pid on script exit. The simplest way in bash might be something like kill $(jobs -p)

This can get a bit more complicated if you want it all to exit if anything fails or something like that. Read up on pkill, disown, kill, $$, trap…tons of possibilities

Some of these things aren’t very portable though, so do check if you decide to switch shells….or do what the rest of us do and scratch your head for an hour before cussing ourselves for not being posix compliant, swear we will next time, then don’t