Category: bash
-
bash – escaping variables for use within commands
Escaping quotes within variables is always painful in bash (somehow) – e.g. foo”bar and it’s not obvious that you’d need to write e.g. “foo”\””bar” (at least to me). Thankfully a bash built in magical thing can be used to do the escaping for you. In my case, I need to pass a ‘PASSWORD’ variable through…
-
postfix / postscreen and dns blacklist fun
first steps in using postfix’s postscreen for dns blacklist stuff; fixing access to allow in known pop3/imap authed connections….
-
(re)building varnish modules
Automated rebuilding of varnish modules using docker …
-
Bash / MySQL queries…
Reduce connection counts to MySQL by using an array to get many values at once (assuming they’re single ‘word’ values)
-
curl, jq and slightly dynamic input to a service
I keep forgetting the syntax for these two things, so there’s a chance writing it here will help me remember. Possibly of use/relevance for: elasticsearch or Debezium….
-
TP-Link HS110 – controlling from the command line
I have a TP-Link HS110 plug (probably identical to the HS100 … but I thought being able to query it through the app to find out energy usage would be neat …). Anyway, it originally didn’t seem to let me schedule it through the app, so I dug around and wrote a crap shell script…
-
Avoiding unnecessary commands in bash….
Some alternative bash things…. ( avoiding unneecessary use of cat / awk / grep …. )