Skip to content

Commit

Permalink
Added a swap function to swap filenames of 2 files
Browse files Browse the repository at this point in the history
  • Loading branch information
eko committed Mar 14, 2019
1 parent e97c9fd commit 8c5a864
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .functions
Expand Up @@ -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 <file1> <file2>
function swap() {
mv $1 $1.tmp && mv $2 $1 && mv $1.tmp $2;
}

0 comments on commit 8c5a864

Please sign in to comment.