Posts tagged #bash

Run and stop multiple long-running commands from Bash with a trap

by Liam Hammett · 7 minute read · #bash #laravel #cli

Sometimes when working on a project, I’ll always want to run a handful of commands at the same time, some of which may return when they’re done, others might be long-running, like watchers or services actively exposing ports.

This is something that might seem simple to do with a basic Bash script at first, but what if your script has multiple processes running side-by-side and you want to be able to stop them all at once too?

Here we’re going to take a look at how we can achieve this with Bash traps and the single-ampersand operator.

Read more…

Cenafy For Bash

by Liam Hammett · 2 minute read · #open-source #bash

Based on the wonderful Chrome extension of the same name that lets you know who the champ is, this is a version for Bash that lets an unsuspecting victim who left their terminal open know about the champ via the magic of ASCII art (and even some killer singing, if they have the say command like on Mac OS).

You can install it as a command with wget:

Read more…