#!/usr/bin/perl use strict; use Net::SSH::Expect; my @hostnames=("abc"); my $ssh = Net::SSH::Expect->new ( host => "", user => 'abc', raw_pty => 1 ); foreach (@hostnames) { $ssh->host=@_; 这里应该如何给host赋值? $ssh->run_ssh() or die "SSH process couldn't start: $!"; my $result = $ssh->exec($ARGV[0]); print($result...
by adminsinx - Perl - 2008-12-29 16:20:01 阅读(1605) 回复(4)
各位大哥, c++问题 1个txt 文件, 有没有办法 让r(i) 变成 读到第i 行的东西啊? 例如 Tom 100 》》line 1 Jenny 150 》》line 2 John 160 》》line 3 string s; for (int i=0; i<5; i++) getline(fin, s); string r (i )=s; >>>> (不知道怎么写) 当读第一行,然后赋值给 string r(1)=”Tom 100“ 谢谢了
我想写一个检查系统服务的脚 本, 这是其中的一段, www=`netstat -an|grep LISTEN |grep :80 ` if [ "$www" != ""]; then echo "www is runnning " else echo "www is not running" fi 可是执行的时候总是报错 :command netstat -an|grep LISTEN |grep :80 not find , 这倒底是怎么回事儿呢?
#include
请问各位高手,想请教一个简单的问题,我想统计一个目录下的文件数,.然后和一个固定数进行对比(如:100),我先用ls -l * |grep "^-"|wc -l 这样把当前目录下的文件数统计出来了,但统计值怎么赋给一个变量与100进行对比呢?
%echo `date +'%Y/%m/%d %H:%M:%S'` %2006/04/27 12:53:02 请问如何将 echo `date +'%Y/%m/%d %H:%M:%S'` 的值赋给recordtime? 用recordtime=`echo `date +'%Y/%m/%d %H:%M:%S'`` 出错 recordtime: not found