var="Memory Used: 19.54M" var=${var#*: } # Remove everything up to a colon and space var=${var%M} # Remove the M at the end
Shell Parameter Expansion
http://stackoverflow.com/questions/12671406/bash-removing-part-of-a-string
猜你喜欢
转载自standalone.iteye.com/blog/2271526
今日推荐
周排行