$ gzipped ./zxcvbn.js
398447 B
389.11 KB
0.38 MB
Created
November 18, 2021 20:40
-
-
Save loopmode/bdab45daa5ef19d6c1af7ce9f81a6f5f to your computer and use it in GitHub Desktop.
display gzipped size of files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in your ~/.bashrc | |
gzipped() { | |
if [ -z $1 ]; then | |
echo "No file specified" | |
else | |
b=$(gzip -c $1 | wc -c) | |
echo "$b B" | |
KB=$(awk "BEGIN {printf \"%.2f\n\", $b/1024}") | |
echo "$KB KB" | |
MB=$(awk "BEGIN {printf \"%.2f\n\", $b/1024/1024}") | |
echo "$MB MB" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment