Last change
on this file since e065f44 was a4733fb, checked in by Jim Gifford <clfs@…>, 16 years ago |
File Size Updates. Typo Fixes
|
-
Property mode
set to
100755
|
File size:
408 bytes
|
Rev | Line | |
---|
[a4733fb] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | FILENAME=$1
|
---|
| 4 |
|
---|
| 5 | if [ "${FILENAME}" = "" ]; then
|
---|
| 6 | echo "To Calculate the proper file size use the following command."
|
---|
| 7 | echo "$0 filename"
|
---|
| 8 | exit 255
|
---|
| 9 | else
|
---|
| 10 | FILESIZE=$(ls -l ${FILENAME} | cut -f5 -d' ')
|
---|
| 11 | ((size=${FILESIZE}/1024))
|
---|
| 12 | if [ "${size}" = "0" ]; then
|
---|
| 13 | size=$(echo .$(echo ${FILESIZE} | cut -b1))
|
---|
| 14 | fi
|
---|
| 15 | FILEMD5SUM=$(md5sum ${FILENAME})
|
---|
| 16 |
|
---|
| 17 | echo "${size} KB"
|
---|
| 18 | echo "${FILEMD5SUM}"
|
---|
| 19 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.