reelieuglie


Project maintained by reelieuglie Hosted on GitHub Pages — Theme by mattgraham

Stream Editing and Parsing

Remove Blank Lines from a file

sed '/^$/d' $insertFilePathHere

Find the field numbers for a CSV file (replace $csv_filename with the name and path of the .csv file)

cat $csv_filename| head -n 1 | tr ',' "\n" | cat -n

Turn Epoch Timestamps into Human Readable

grep for just var; like when searching for variables in a terraform template

grep -oE '\bvar.*\b'

grep up to a number of alphanumeric characters

grep -oE 'i-[0-z]{0,17}'

Note That’s for instance-ids

diff between command outputs

diff <(command 1) <(command 2)