shell字符截取
2020-11-07 本文已影响0人
疾飞
截取以vm开头的单词
grep -o vm.* text | cut -d' ' -f1

截取网段内的存活主机
nmap -sP 106.14.134/24 | grep -Eo "([0-9]{1,3}\.){3}[0-9]{1,3}"

截取以vm开头的单词
grep -o vm.* text | cut -d' ' -f1
截取网段内的存活主机
nmap -sP 106.14.134/24 | grep -Eo "([0-9]{1,3}\.){3}[0-9]{1,3}"