Skip to content

Instantly share code, notes, and snippets.

@dexterous
Last active September 6, 2022 07:48
Show Gist options
  • Save dexterous/a0e597a0109ef286f7a9 to your computer and use it in GitHub Desktop.
Save dexterous/a0e597a0109ef286f7a9 to your computer and use it in GitHub Desktop.
aws vs sed
#!/bin/bash
echo "Here's what we're parsing"
cat -T input
echo ''
echo "First, we try awk and then cut"
echo ''
set -o xtrace
awk '{ print $1 "\t" $2 }' input
tr -s '[:blank:]' "\t" <input | cut -f 1,2
a b
a b
a b
a b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment