shell: ip合法性检查
2013-11-28 15:35
447 查看
ipcalc -cs x.x.x.x && echo 'IP Right' || echo 'IP Error'
其中 x.x.x.x 指IPv4地址,多么神奇的命令呐
ipcalc: ip address expected Usage: ipcalc [OPTION...] -c, --check Validate IP address for specified address family -4, --ipv4 IPv4 address family (default) -6, --ipv6 IPv6 address family -b, --broadcast Display calculated broadcast address -h, --hostname Show hostname determined via DNS -m, --netmask Display default netmask for IP (class A, B, or C) -n, --network Display network address -p, --prefix Display network prefix -s, --silent Don't ever display error messages Help options: -?, --help Show this help message --usage Display brief usage message
相关文章推荐
- shell拷贝依赖库文件
- Linux Shell脚本攻略(转)
- 【转】你可能不知道的Shell
- shell 批量添加用户健壮版 推荐
- shell 批量打包
- linux下利用shell脚本实现添加crontab任务
- Shell Script : Join small gzipped files into larger files without unzipping them
- Linux Shell 进制错误 - value too great for base
- Shell In A Box:一款访问远程Linux服务器的SSH终端
- linxu shell 递归和while循环 的 factorial计算
- Linux Shell脚本攻略
- phpcms V9后台拿shell时出错的解决办法
- login shell和nologin shell的区别以及su和su - 的区别
- 解决BASH SHELL脚本报错 ‘: not a valid identifier
- 删除乱码文件 shell
- Linux Shell 文本文件处理
- Linux Shell 编程(一)
- linux shell编程指南第九章------AWK 介绍2
- Shell脚本之文件属性比较
- 环境变量及bash初始