Created
September 30, 2018 00:13
-
-
Save arodbits/6e44ef34f8b038123eddf89ae5d3222f to your computer and use it in GitHub Desktop.
add up all column values
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
res=0; for dir in $a; do val=$(du -s /dir_path | awk '{ print $1 }'); res=$(($val+$res)); done; | |
#The result is in KB by default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment