One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
#!/usr/bin/env -S sed -Ef | |
# Replace 12-digit strings (AWS Account IDs) | |
# 123456789012 => 123********* | |
s/([^0-9])([0-9]{3})[0-9]{9}([^0-9])/\1\2*********\3/g | |
# Replace Social Security Numbers (SSNs) with dashes => | |
# 123-45-6789 => 123-**-**** | |
s/([^0-9])([0-9]{3})-([0-9]{2})-([0-9]{4})([^0-9])/\1\2-**-****\5/g |
#!/bin/sh | |
# Terraform's External provider: | |
# https://www.terraform.io/docs/providers/external/data_source.html | |
# | |
# Sample usage (Terraform): | |
# data "external" "nextmonth" { | |
# program = ["sh", "${path.module}date_from_now_terraform.sh"] | |
# | |
# query = { |
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |