Chinaunix首页 | 论坛 | 博客
  • 博客访问: 846074
  • 博文数量: 63
  • 博客积分: 1317
  • 博客等级: 中尉
  • 技术积分: 686
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-30 22:07
文章分类

全部博文(63)

文章存档

2015年(4)

2014年(1)

2013年(1)

2012年(2)

2011年(54)

2010年(1)

我的朋友

分类: Python/Ruby

2011-07-20 17:21:10

shell脚本:检查hosts.equiv内容,红色显示+号,其它配置信息绿色显示

if [ `grep -v "#" /etc/hosts.equiv|wc -l` -gt 0 ];then
echo "This host has the hosts.equiv configuration,detailed configuration is:\n "

grep -v "#" /etc/hosts.equiv|while read i
do
echo $i|awk '{for(i=1;iecho "\n"
done
echo "\033[0m\n"
fi
阅读(1262) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~