From 4d43219c6e72a0c6e878dd44a4976cb5d7b78d89 Mon Sep 17 00:00:00 2001 From: "J. Randall Hunt" Date: Thu, 23 Nov 2017 23:46:04 -0800 Subject: [PATCH] add s3head and s3cat based on some random twitter person --- alias | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/alias b/alias index fc01acd..d711c9c 100644 --- a/alias +++ b/alias @@ -134,3 +134,19 @@ revoke-my-ip-all = !f() { aws revoke-my-ip ${1} all all }; f + +s3cat = + !f() { + tmpfile=$(mktemp) + aws s3 cp $1 $tmpfile + cat "$tmpfile" + rm "$tmpfile" + }; f + +s3head = + !f() { + tmpfile=$(mktemp) + aws s3 cp $1 $tmpfile + head -n $2 "$tmpfile" + rm "$tmpfile" + }; f