Reading elements into hash

2004-02-28 Thread Leaw, Chern Jian
Hi, I have a script written below (by John Krahn and WC-Sx-Jones from this mailing list) which changes the file format from: #cat PSCS-ORIG abinabdu adanie2 agibson agoh1aiabouse akko alau alee1alee2amitb amohdali amshams anmohand to the format listed below when pr

RE: Changing file output format

2004-02-28 Thread Leaw, Chern Jian
Hi John, Yes I intended to put all into a single array, but failed to do so earlier. When I execute the script I expect the output to look like: abinabdu adanie2 agibson agoh1 aiabouse akko alau alee1 alee2 amitb amohdali amshams anmohand Thanks -Original Message- From: John W. Krahn [

Changing file output format

2004-02-28 Thread Leaw, Chern Jian
HI, I would like to change output format of a file from: abinabdu adanie2 agibson agoh1aiabouse akko alau alee1alee2amitb amohdali amshams anmohand to the format listed below when printing it out to the standard output: abinabdu adanie2 agibson agoh1 aiabouse

FW: Converting/executing a PERL script in binaries

2003-06-29 Thread Leaw, Chern Jian
gave make no sense since you're not sending mail." found in the file WRAPPER.OUT. Any help is indeed appreciated. Thanks -Original Message----- From: Leaw, Chern Jian Sent: Sunday, June 29, 2003 6:17 PM To: [EMAIL PROTECTED] Subject: Converting/executing a PERL script in binar

Converting/executing a PERL script in binaries

2003-06-29 Thread Leaw, Chern Jian
efore enforcing such good PERL programming practices. Hope that this is acceptable by this forum's community. Thanks > -Original Message- > From: Leaw, Chern Jian > Sent: Friday, June 27, 2003 5:20 PM > To: [EMAIL PROTECTED] > Subject: Convertin

Converting/executing a PERL script in binaries

2003-06-27 Thread Leaw, Chern Jian
HI, I'm wanting to execute my PERL script in a binary/executable form. I wrote a C wrapper to do so. However, when executing the binary code produced by the wrapper, it produced the warning message as attached the file WRAPPER-OUTPUT.txt. However, when executing just the script itself, the script

RE: PERL format utility -error

2003-06-26 Thread Leaw, Chern Jian
HI John & eveyone, I did solve the syntax error with regards to the format utility. However, when I tried including the format utility into the contents of the mail, the contents of the mail were empty. Hence I tried writting the formatted contents into a text file and it worked. The only drawba

RE: PERL format utility -error

2003-06-25 Thread Leaw, Chern Jian
HI John, I tried the method that you suggest below: format STDOUT = @ @#.## @<< @<< @#.## @<< @ $progNo, $version, $protocol, $port, $service, $response . This suggestion did eliminate the syntax error. However, the info

PERL format utility -error

2003-06-25 Thread Leaw, Chern Jian
Hi, I have the script below which outputs some values in a "tabular" form into the body of a mail. I'm using the format utility in PERL to output the values in a tabular form as in: PROG NO VERSION PROTOCOLPORTSERVICE RESPONSE --

pattern matching problems

2003-06-13 Thread Leaw, Chern Jian
% ./file-3a.pl /home/weird opened successfully Here ... Here ... Here ... Here ... prog no = version = protocol= port = service = response = The expected output, assuming everything is correct, would have a mail generated with the format below: Date: Tue, 10 Jun 2003 18:48:28 +0800 (MAL) From: A

RE: pattern matching

2003-06-10 Thread Leaw, Chern Jian
HI Rob, >From the output generated below, I would like to obtain the string from "RPC: Timed out" onwards. This string corresponds to the response attribute. Another example of the response attribute is the "program 18 version 1 sleeping". 107374 / 1 / udp / 64018 / rpcinfo / RPC: Timed out 10

pattern matching

2003-06-10 Thread Leaw, Chern Jian
HI, I have a text file below which is simply an output from the UNIX utility rpcinfo: 181 udp 55734 walld program 18 version 1 ready and waiting 1073741 udp 64018 rpcinfo: RPC: Timed out 181 tcp 55684 sprayd program 18 version 1 sleeping I

sendmail syntax error

2003-06-01 Thread Leaw, Chern Jian
HI, I have the attached script which reads the input text file of the form: # cat rpcinfo.txt program vers proto port service response 104 tcp 111 portmapperprogram 10 version 4 ready and waiting 103 tcp 111 portmapperprogram 10 ver

Adding '#' at the beginning of a file

2003-02-23 Thread Leaw, Chern Jian
Hi, I'm trying to add the symbol '#' in the /etc/services file for disabling the following services: ftp chargen daytime I've placed the name of the services i.e ftp, chargen, daytime into a text file to be read by the script. This is because there are many other services to be disabled from the