[RndTbl] Collection of Bash one-liners

J. King jking at jkingweb.ca
Tue May 10 16:31:57 CDT 2022


On Tue, 2022-05-10 at 12:47 +0000, Adam Thompson wrote:
> https://onceupon.github.io/Bash-Oneliner
> 
> Rather long, makes for good bedtime reading in that sense, but an
> interesting guide to what the standard Linux/MacOS shell can do.

These are often fun, though the list commits what I feel is a cardinal
sin by demonstrating an imagemagick command (identify) without noting
the command is part of imagemagick. It's not as common a package as it
once was (it is installed on my system as a dependency of cups, but
that's it), and its use of generic names for special-use commands is,
shall we say, not good form.

While not a useful one-liner for a human, I used the following in a
script this morning:

systemctl show $unit --property=UnitFileState --value
systemctl show $unit --property=ActiveState --value

The information returned is otherwise provided by `systemctl status`
with less typing, but the output of these is much more concise.


More information about the Roundtable mailing list