From 74476b9bbf6e1e3a5c0bf5c2c45f15d225897e1d Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 26 Jun 2015 16:21:27 -0700 Subject: [PATCH] Add slightly better 'awk' condition --- hello-world/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello-world/update.sh b/hello-world/update.sh index f36ea30ae..7ceae2ea2 100755 --- a/hello-world/update.sh +++ b/hello-world/update.sh @@ -13,7 +13,7 @@ echo docker run --rm hello-world echo echo '$ docker images hello-world' - docker images hello-world | awk -F' +' '$2 == "TAG" || $2 == "latest" { print $1"\t"$2"\t"$3"\t"$5 }' | column -t -s$'\t' + docker images hello-world | awk -F' +' 'NR == 1 || $2 == "latest" { print $1"\t"$2"\t"$3"\t"$5 }' | column -t -s$'\t' } | sed 's/^/\t/' echo