python 判断字符串中是否只有中文字符 学习了:https://segmentfault.com/q/1010000007898150 def is_all_zh(s): for c in s: if not ('\u4e00' <= c <= '\u9fa5'): return False return True
判断网络主机存活企业面试题4:写一个脚本,实现判断10.0.0.0/24网络里,当前在线用户的IP有哪些(方法有很多) #!/bin/sh#[ -f /etc/init.d/functions ] && . /etc/init.d/functionsfunction IP_count(){ for n in 10.0.0.{0..255} do IP_check=`nmap -sP $n|grep "Host is up"|wc -l` if [ ${
一个参数的方法是已知Pid判断进程是否存活.两个参数的方法是已知节点和Pid或进程名判断进程是否存活. is_process_alive(Pid) when is_pid(Pid)->rpc:call(node(Pid),erlang,is_process_alive,[Pid]);is_process_alive(_Pid)->false. is_process_alive(undefined,_ProcName)->false;is_process_alive(_Node,undef