Posts Tagged “bash”
Tutorials about the bash shell
Easy Access of Cloudformation Lambda Environment Variables.
11 September 2023
Sometimes you want to run your lambda function deployed as a cloudformation
stack locally for testing purposes but you don’t want to hard code any of the
underlying resources into your environment. These resources might be things
like DynamoDB tables, SNS topics or SQS urls. Their names aren’t hard coded,
and shouldn’t be hard coded otherwise you have a singleton stack. Sometimes
you’re just a bit too impatient to spin everything up using the SAM cli, and
don’t want to debug docker issues, so this helps.
Computing Most Chatty People in IRC
03 May 2022
Recently I was trying to figure out who was most active on the IRC
server I frequent. IRC by it’s very nature leaves log files so that you
have a record of your conversations in your control. So you can perform
some processing on them to determine various statistics. This is a one
liner to compute that.
Using a Bash Script to Generate Random Fake Data To Insert Into DynamoDB
30 March 2021
I’ve been studying for my developer associate certification on Amazon
Web Services. I’ve been practicing with the various streaming solutions
like SQS and Kinesis lately. I’ve wanted to branch into using DynamoDB
and capturing changes. To do that I needed to generate a lot of take
A Brief and Painless Introduction To Bash
27 January 2021
A pretty decent introduction to Bash for pipelines and interactive use.
Finding Jekyll Posts to Update With Cover Images
10 January 2021
I recently updated my site to make use of cover images on the post
listing. I wanted to make sure that I got all of the posts that need to
be updated. I used grep to find posts which had an image in them, but no
cover attribute in their front-matter.
Advent of Code Input Getter
03 December 2020
I wrote a bash function to get my daily Advent of Code input. It
assumes that you are in a directory ending in the pattern year/day,
where year is the year you’re doing the problems. Here’s the code
Using jq and bash for JSON processing
06 November 2020
This is a lightning talk I gave to the CPLUG November 2020 meeting on how to use jq with bash for dealing with JSON in modern tooling.
NOTE: use the space bar to scroll.
Inspecting All Running Docker Containers
29 October 2020
I just discovered how to run inspect on all running docker containers.
A Lazy Way to Collect Runtime Stats About Running Docker Containers
23 July 2020
So I was recently messing with Docker to keep up on my skills, and I
wanted to see how much resources were required by each container over a
given time period. So I came up with the following command to run in the
terminal to collect it.
Compressing All Git Repositories On Your Machine
27 June 2019
So I recently felt the need to compress all the git repositories on my
machine. This was mainly because I wanted to reduce the number of files
I had to wait to backup. So here’s the commands I used to make that
Incrementing a Semantic Version String in Bash
30 April 2019
I wrote a bash function that takes a semantic version string and bumps
the version number. It supports all 3 layers. I needed it for the deploy
script I was working on. It’s fairly trivial, I just thought I would
Temperature Monitoring on Linux
21 October 2018
Here’s a little shell function to view your system thermometers. Most
people would just tell you to install the lm-sensors package, but
that’s another package. Why do that when Linux presents it through the
Fortran Subroutine Extractor
15 July 2018
I’ve been working on a fortran codebase with a lot of code duplicated
between subroutines, so I came up with this little bash function using
awk to extract subroutines, so I can find the difference between them.
A Brief Introduction to AWK
30 December 2017
This will be brief introduction to awk and it’s many uses. I will show a
few brief segments about various uses of awk and when it comes in handy
for certain tasks. For more detail one should read the
Awk User’s Manual.
Analyzing Your Takeout Data From Google Fit
27 June 2017
Google allows you to export your data from various products. In this post I
show how one can run analysis on my data from Google Fit to find various pieces
of information using the basic bash command line tools.
Finding the Largest File Stored in Your Git Repository
30 January 2017
This command will find the largest file from the output of git ls-files
which outputs the path to each of the files stored in git below your
Calculating the Size of Your Video Library
07 December 2016
This command will calculate the size of your movie and video library in
days. You can modify the awk command as you see fit to calculate the time