Skip to content

Commit

Permalink
Add function to calculate percentage
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav-nath committed Oct 15, 2022
1 parent 01aff6f commit 94f9803
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dev-setup/.functions
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ function mkd() {
fi
}

# Calculate percentage
function percent() {
if [ $# -ne 2 ]; then
echo "Error - 2 arguments are mandatory!"
fi

echo "scale=2; $2*$1/100" | bc
}

# Add ssh keys on login
function sshadd() {
ssh-add -l >/dev/null
Expand Down

0 comments on commit 94f9803

Please sign in to comment.