Created
May 6, 2013 21:04
-
-
Save sshongru/5528183 to your computer and use it in GitHub Desktop.
Given a file it returns the file size from wc -c with the extra strings stripped off.
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
#!/bin/sh | |
# Usage: ./getFileSize.sh myFile.exe | |
# Outputs file size of the given file | |
FILE=${1} | |
DIRTY=`wc -c ${FILE}` | |
CLEAN="${DIRTY}" | |
CLEAN="${CLEAN% *}" | |
CLEAN="${CLEAN##* }" | |
echo ${CLEAN} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment