标签: python bash os.system
import os cmd='for file in /proc/*/status ; do awk \'/VmSwap/||/^Pid/||/Name/{printf "%-20s", $2 $3}END{ print""}\' $file; done | sort -nr -k 3 | head -5' os.system(cmd)