If (in zsh) I have an array that contains something like this:
echo ${fsizes[@]}
9.5M 100M 5G 15G 1.2T
is there an easy way to get the sum of these in an output of choice (i.e. bytes, megabytes, gigabytes etc?)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Example with output in Bytes
Example with output in Kilobytes
Example with output in Megabytes
Example with output in Gigabytes
Example with output in Terabytes