Skip to content

Commit bba4f0f

Browse files
committed
remove unnecessary comments
1 parent 506843d commit bba4f0f

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

inventory

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,27 @@ while [[ $# -gt 0 ]]; do
4040
MODE="size"
4141
shift
4242
;;
43-
-r | --recursive) # count modifier
43+
-r | --recursive)
4444
RECURSIVE=true
4545
shift
4646
;;
4747
-[0-9] | --[0-9]-decimals)
48-
# Extract just the number from -# or --#
4948
DECIMALS=${1//[!0-9]/}
5049
if ! [[ $DECIMALS =~ ^[0-9]+$ ]]; then
5150
echo "inventory: invalid number of decimal places"
5251
exit 1
5352
fi
5453
shift
5554
;;
56-
-KB | --kilobytes) # size modifier
55+
-KB | --kilobytes)
5756
NUMBER_FORMAT="KB"
5857
shift
5958
;;
60-
-MB | --megabytes) # size modifier
59+
-MB | --megabytes)
6160
NUMBER_FORMAT="MB"
6261
shift
6362
;;
64-
-GB | --gigabytes) # size modifier
63+
-GB | --gigabytes)
6564
NUMBER_FORMAT="GB"
6665
shift
6766
;;
@@ -123,7 +122,7 @@ elif [ $MODE = "size" ]; then
123122
SIZE=$(awk -v size="$FILE_SIZE" -v dec="$DECIMALS" 'BEGIN { printf "%0." dec "f", size/1000000000 }')
124123
UNIT="GB"
125124
fi
126-
# Remove trailing .00 if there are no decimal places
125+
127126
if [[ $DECIMALS -eq 0 ]]; then
128127
SIZE=${SIZE%.*}
129128
fi

0 commit comments

Comments
 (0)