aws-quickstart / quickstart-documentation-base-common

Common components of the quickstart-documentation-base repo. Stored here to facilicate a centralized source-of-truth for common components of our documentation
Apache License 2.0
14 stars 17 forks source link

Awk to capture both variants of the commit ID #116

Closed andrew-glenn closed 3 years ago

andrew-glenn commented 3 years ago

I had a nice awesome explaination but it didn't take, so..

TLDR:

❯ git submodule
-0ed73f22f2ea225fb62a8e20369423c77d41ba57 docs/boilerplate
❯ git submodule | grep docs/boilerplate | cut -d - -f 2 | awk '{print $1}'
0ed73f22f2ea225fb62a8e20369423c77d41ba57
❯ git submodule
 0ed73f22f2ea225fb62a8e20369423c77d41ba57 docs/boilerplate (heads/main)
❯ git submodule | grep docs/boilerplate | cut -d - -f 2 | awk '{print $1}'
0ed73f22f2ea225fb62a8e20369423c77d41ba57

Current Behavior

❯ git submodule
 0ed73f22f2ea225fb62a8e20369423c77d41ba57 docs/boilerplate (heads/main)
❯ git submodule | grep docs/boilerplate | cut -d - -f 2 | cut -f 1 -d " "
❯ git submodule
-0ed73f22f2ea225fb62a8e20369423c77d41ba57 docs/boilerplate
❯ git submodule | grep docs/boilerplate | cut -d - -f 2 | cut -f 1 -d " "
0ed73f22f2ea225fb62a8e20369423c77d41ba57