#!ruby -na puts'm kg s A K mol cd'.gsub(/.+/){[$&,c=$F.count($&)+2*$F.count("#$&2")][0,c]}.split*' '
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page