Chinaunix首页 | 论坛 | 博客
  • 博客访问: 446451
  • 博文数量: 481
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 1040
  • 用 户 组: 普通用户
  • 注册时间: 2013-01-06 14:09
文章分类

全部博文(481)

文章存档

2013年(483)

我的朋友

分类: LINUX

2013-02-28 12:44:32

在shell脚本中需要用root用的来执行指令:
sudo 自动输入密码

echo "password" | sudo -S netstat -tlnp

       -S          
The -S (stdin) option causes sudo to read the password from the standard input instead of the terminal device.
阅读(1542) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~