Thread Datei mit x Zeilen und 5 Spalten auslesen | wget $1 $2 $3 usw. (25 answers)
Opened by guest newbie at 2009-09-24 11:34

findus2099
 2009-09-28 16:21
#126297 #126297
User since
2009-09-28
4 Artikel
BenutzerIn
[default_avatar]
Hallo zusammen
ich bin etwas weiter gekommen, aber das letzte Problem stellt sich als sehr zäh dar.

Der Aufruf system "cmd", $var, usw. tut bei mir nicht. Laut meinem LamaBuch und dem Beitrag von 'bettwerworld' im wiki mach ich aber alles richtig!?

Wenn ich das skript mit perl -d laufen lasse, bekomme ich diesen Auszug:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/opt/OV/nonOV/perl/a/bin/perl -d webpage_check.pl

Loading DB routines from perl5db.pl version 1.28
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(webpage_check.pl:24):      my $MON_NAME = $ARGV[0];
  DB<1> n
main::(webpage_check.pl:27):      my $config = '/var/opt/OV/bin/instrumentation/webpage_check.cfg';
  DB<1> n
main::(webpage_check.pl:30):      open my $fh, '<', $config or die $!;
  DB<1> n
main::(webpage_check.pl:33):      while( my $line = <$fh> ) {
  DB<1> n
main::(webpage_check.pl:40):          my ($fqdn, $svc_id, $url, $pattern, $comment) = split (/\t/, $line);
  DB<1> n
main::(webpage_check.pl:43):          my $content = safe_backticks('/usr/sfw/bin/wget', '-t', '2', '-T', '5', '-S', '-O', '-', $url );
  DB<1> n
--16:16:19--  http://blablabla/
           => `-'
Resolving blablabla
Connecting to blablabla|:80... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Date: Mon, 28 Sep 2009 14:16:19 GMT
  Server: Apache/2.2.2 (Win32) mod_jk/1.2.19
  Set-Cookie: JSESSIONID=AC77D1E711FE15DCDBCA27E5C4F64E7A; Path=/jupiter
  Pragma: No-cache
  Cache-Control: no-cache,no-store,max-age=0
  Expires: Thu, 01 Jan 1970 00:00:00 GMT
  Connection: close
  Content-Type: text/html;charset=UTF-8
Length: unspecified [text/html]

    [ <=>                                                                                           ] 71,956        --.--K/s

16:16:19 (3.75 MB/s) - `-' saved [71956]

main::(webpage_check.pl:50):        my @foo = grep(/$pattern/, $content);
  DB<1> n
main::(webpage_check.pl:52):                if ( @foo ){
  DB<1> n
main::(webpage_check.pl:54):            system ("/opt/OV/bin/opcmon", "Webpage_check=0", "-object", "Webpage_Monitor", "-option", "node=", $fqdn, "-option", "url=", $url, "-option", "svc_id=", $svc_id, "-option", "comment=", $comment);
  DB<1> n
Invalid parameter: 'servername_blabla'. (OpC30-683)
main::(webpage_check.pl:40):          my ($fqdn, $svc_id, $url, $pattern, $comment) = split (/\t/, $line);
  DB<1> n
main::(webpage_check.pl:43):          my $content = safe_backticks('/usr/sfw/bin/wget', '-t', '2', '-T', '5', '-S', '-O', '-', $url );
  DB<1> q


Ich habe servername etc. rausgeschmissen falls ihr euch über die blabla Einträge wundert..

Viele Grüße
findus2099

View full thread Datei mit x Zeilen und 5 Spalten auslesen | wget $1 $2 $3 usw.