From 8c5a864943c210e503530a0942425ccb2ba7bedc Mon Sep 17 00:00:00 2001 From: Vincent Composieux Date: Thu, 14 Mar 2019 20:31:51 +0100 Subject: [PATCH] Added a swap function to swap filenames of 2 files --- .functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.functions b/.functions index cb06f56..4f8bd26 100644 --- a/.functions +++ b/.functions @@ -392,3 +392,8 @@ function kforward { podName=`kubectl get pods -n $2 --context $1 | grep $3 | cut -d' ' -f1` kubectl port-forward --context=$1 -n $2 $podName $4 } + +# Usage: swap +function swap() { + mv $1 $1.tmp && mv $2 $1 && mv $1.tmp $2; +}