« Stopping windows update reboot prompts | Main | Extracting an RPM… »
shell math and alphanumeric sizes…
By Matt | July 30, 2009
Just because I really like the elegance:
preload_count=$(echo "($preload_size) / ($file_size)" | sed 's/K/ * 1024/g' | sed 's/M/ * 1048576/g' |\ sed 's/G/ * 1073741824/g' | bc)
Topics: Uncategorized | No Comments »
Comments
You must be logged in to post a comment.