awk 'BEGIN{print "I will try my best to fill your RAM.\nYou have 3 seconds to quit (Ctrl+C)"; system("sleep 3"); while(1){m[++c]=sprintf("%10485760s",""); print (c*10)"MB allocated"}}'
复制代码
6秒间隔的限速版本
awk 'BEGIN{print "I will try my best to fill your RAM.\nYou have 3 seconds to quit (Ctrl+C)"; system("sleep 3"); while(1){m[++c]=sprintf("%10485760s",""); print (c*10)"MB allocated"; system("sleep 6")}}'