
skynet
world100
勇往直前,无所畏惧.
展开
-
skynet中获取本地IP地址
local str = (io.popen "ifconfig"):read "*a"local st = string.find(str,"inet") + 5local str2 = string.sub(str,st)local en = st + string.find(str2,' ')local ip = string.sub(str,st,en) -2print("333______...原创 2017-07-31 18:23:44 · 1086 阅读 · 0 评论 -
linux根据进程参数关闭进程
最近发现skynet 进程同名的有很多个,传参不一样,希望能通过传参的不一样去关闭某个进程killnode.sh game#!/bin/bashif [ $# == 1 ]; then progress=$1 ps -ef | grep skynet | grep $progress | awk '{print $2}' | xargs kill -9 echo ...原创 2018-09-10 15:13:44 · 560 阅读 · 0 评论