Chinaunix首页 | 论坛 | 博客
  • 博客访问: 642371
  • 博文数量: 198
  • 博客积分: 4256
  • 博客等级: 上校
  • 技术积分: 1725
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-15 13:12
文章分类

全部博文(198)

文章存档

2012年(12)

2011年(39)

2010年(135)

2009年(12)

我的朋友

分类: LINUX

2010-07-27 12:57:20

在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.
阅读(7823) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~