Re: Handling special characters in peoples names in XML

2013-06-25 Thread Gregory Machin
...@krynicky.cz wrote: From: Gregory Machin g...@linuxpro.co.za I'm debugging an application written in Perl that converse data exported from the Nessus security scanner in xml format. I have narrowed down the bug to an issue with special characters in names that are in the file such as Fr~A©d~A©ric

Handling special characters in peoples names in XML

2013-06-19 Thread Gregory Machin
Hi. I'm debugging an application written in Perl that converse data exported from the Nessus security scanner in xml format. I have narrowed down the bug to an issue with special characters in names that are in the file such as Frédéric and Grégoire , thus é are most likely the guilty

DBI driving me nuts ... !

2009-10-06 Thread Gregory Machin
Hi Please can you advise ? #!/usr/bin/perl use Mysql; $dbh = Mysql-connect(localhost,mailscanner,root,c0nc3pt) or die (Error . Mysql-errno . - . Mysql-errstr); $sql = SELECT to_address FROM maillog LIMIT 10;; $sth = $dbh-query($sql) or die (Error . Mysql-errno . - . Mysql-errstr); while

regex question

2009-09-15 Thread Gregory Machin
Hi I'm look for code example that will only select a string containing 3 digits .. The string cant be less than 3 digit , can't be more than 3 and can't contain any other characters. I have googled and found code that will find 3 consecutive digits within a string or at the beginning. Any ideas

Re: regex question

2009-09-15 Thread Gregory Machin
digits from the phone number eg 011 . So I only want the records that beginning and end in a number and have exactly 3 digits not longer. Thanks for you time. G On Tue, Sep 15, 2009 at 9:52 AM, Tim Bowden tim.bow...@mapforge.com.au wrote: On Tue, 2009-09-15 at 09:30 +0200, Gregory Machin

Re: regex question

2009-09-15 Thread Gregory Machin
Thanks for the help .. knowing the anchor thing help me. if you not sure what ur looking for or what it call you end up with the wrong thing. On Tue, Sep 15, 2009 at 10:21 AM, Tim Bowden tim.bow...@mapforge.com.au wrote: On Tue, 2009-09-15 at 10:10 +0200, Gregory Machin wrote: Any numbers

Trying to remove text in inverted commas.

2009-08-24 Thread Gregory Machin
seem to work. I got it from a website .. It looked correct .. mmm .. with regard to it's structure i don't quite get ([^]+) as I have tried replacing it with other combinations and had less luck. I have also tried s/\([:word:])\\s)//g ... Thanks for advise in advance Gregory Machin

Re: Trying to remove text in inverted commas.

2009-08-24 Thread Gregory Machin
/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A On Mon, Aug 24, 2009 at 12:19 PM, Thomas Bätzlert.baetz...@bringe.com wrote: Hello Gregory, Gregory Machin gregory.mac...@gmail.com asked: I'm writing a script to import logs into a Mysql .. My Perl

using ssh to do remote audit of machines

2008-09-09 Thread Gregory Machin
Hi I have a database with my servers details in .. I would like to write a scripts to get the servers log on info ssh to the box and get basic info using the following hostname cat /etc/issue cat /proc/cpuinfo | grep model name cat /proc/meminfo | grep MemTotal uname -s -r squid -v

Re: using ssh to do remote audit of machines

2008-09-09 Thread Gregory Machin
Thanks will look into those . On Tue, Sep 9, 2008 at 10:07 AM, Jeff Pang [EMAIL PROTECTED] wrote: 2008/9/9 Gregory Machin [EMAIL PROTECTED]: Hi I have a database with my servers details in .. I would like to write a scripts to get the servers log on info ssh to the box and get basic info

Re: store a complete object?

2008-08-05 Thread Gregory Machin
hi I dont see why you couldnt just INSERT the value into a database .. It's just the column type that may be the issue with mysql i would suggest the blob or one of the text types http://dev.mysql.com/doc/refman/5.0/en/blob.html .. On Tue, Aug 5, 2008 at 1:02 PM, Oliver Block [EMAIL

system() function not executing scripts

2007-10-12 Thread Gregory Machin
have chowned them to the user squid, and even chmod 0777 them, but no joy, yet they work fine if executed buy root what have i missed ? -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

script won't write to file ...

2007-07-20 Thread Gregory Machin
; -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

testing if hardware is avalible

2007-07-20 Thread Gregory Machin
Hi can you advise on the best way test if a usb modem is plugged in ? I though about checking if the file/node /dev/ttyACM0 is present, as it's created when the device is plugged in using open (TEST, /dev/tty/ACM0); but just concecned if i do this while the device is acitive it will cause it to

Re: script won't write to file ...

2007-07-20 Thread Gregory Machin
Owens [EMAIL PROTECTED] wrote: On 7/20/07, Gregory Machin [EMAIL PROTECTED] wrote: Hi I have a script that i'm working on, I want it to write info to a log file, but I can't get it to write to the file.. I run the script as root, and I also chmod 0777 the file but still no out put ... what have

Re: Dynamically loading perl code

2007-07-13 Thread Gregory Machin
On 7/12/07, Chas Owens [EMAIL PROTECTED] wrote: On 7/12/07, Gregory Machin [EMAIL PROTECTED] wrote: Hi I have a rusty memory of perl have the ability, where by you can load perl code into an variable / array then execute it on demand, anyone got an example of how to do this .. Many Thanks

Dynamically loading perl code

2007-07-12 Thread Gregory Machin
Hi I have a rusty memory of perl have the ability, where by you can load perl code into an variable / array then execute it on demand, anyone got an example of how to do this .. Many Thanks -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za -- To unsubscribe, e-mail: [EMAIL PROTECTED

missing something from regex ...

2007-05-16 Thread Gregory Machin
+)\,(\w+)\,(\d+\.\d+\.\d+\.\d+\:\d+)\,(\d+\.\d+\.\d+\.\d+)\,(\d+)\,(\d+)\,\,(\d+)/' [EMAIL PROTECTED] ~]# what have I missed ... Many thanks -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: $ARGV[0] breaks the script

2006-12-15 Thread Gregory Machin
name from the command line, it runs as if the process is running if if I have stoped/killed it.. the only reason for this is that there is a hidden character, but where is it comming from ? On 12/14/06, D. Bolliger [EMAIL PROTECTED] wrote: Gregory Machin am Donnerstag, 14. Dezember 2006 13:24

$ARGV[0] breaks the script

2006-12-14 Thread Gregory Machin
]; #$input=httpd; chomp $input; open PROS, ps -ef|grep $input |; while ($line = PROS){ unless ($line =~ m/grep/){ print $input is running\n; exit; } } print $input isn't running\n; exec /etc/init.d/$input restart ; Many thanks -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za -- To unsubscribe

creepy print() that doesnt print.

2006-12-13 Thread Gregory Machin
($line);this line prints fine print (hello); but this one does not print at all } i have allso tried print hello; but the result is the same.. I have tried ping ($line hello); but it does not print the hello. what have I missed .. Many thanks for your time -- Gregory Machin

Re: removing single quotation marks from a string ?

2006-11-23 Thread Gregory Machin
order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za -- To unsubscribe, e-mail: [EMAIL PROTECTED

removing single quotation marks from a string ?

2006-11-16 Thread Gregory Machin
Hi I need to remove all the quotation marks from, a string I tried s/\'// but it did not work. what have i missed ?? Many Thanks -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Re: removing single quotation marks from a string ?

2006-11-16 Thread Gregory Machin
(query is $query\n); print(\n); }else{ print(malformed log entry: $_ \n); } /code $test is a sample of the syntex. On 11/16/06, Gregory Machin [EMAIL PROTECTED] wrote: Hi I need to remove all the quotation marks from, a string I tried s

please advise help with regex

2006-09-28 Thread Gregory Machin
-- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za

Re: please advise help with regex

2006-09-28 Thread Gregory Machin
PROTECTED] wrote: Gregory Machin wrote: Hi I need to parse the logs for my named server. i'm having difficulty getting my mind around the regex to break the data up .. i want the break it up and store it in a data base then maniptulate the data from there ... |date | time

advise on writing cgi scripts to create + manage certificate authority.

2006-08-03 Thread Gregory Machin
Hi I have to write a cgi appliction to manage a certificate authority for AES 256 CBC and 128 CBC ... How would I go about this the only application I have used for this was comand lline interactive... Any suggestions .. -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za

Re: advise on writing cgi scripts to create + manage certificate authority.

2006-08-03 Thread Gregory Machin
Thanks for the lead ... But my question was focused on the creation of a certifictate authority mangment interface using cgi as aposed to comandline ... which is the norm ... I have a basic knowlage of perl cgi.. On 8/3/06, Gregory Machin [EMAIL PROTECTED] wrote: Hi I have to write a cgi

need to return exit code

2006-07-31 Thread Gregory Machin
Hi My perl script is called by a bash script, used in a compile / build env. But the bash script is not seeing my script's exit and is timming out and continuing ... How can I pass a standard exit code 0 = success 1 = fail to the operating system / calling script. Many Thanks -- Gregory Machin

Re: need to return exit code

2006-07-31 Thread Gregory Machin
thanks for the support guys .. have a grate day .. On 7/31/06, Prabu [EMAIL PROTECTED] wrote: Gregory Machin wrote: Hi My perl script is called by a bash script, used in a compile / build env. But the bash script is not seeing my script's exit and is timming out and continuing ... How

regex and parsing config file directives..

2006-07-14 Thread Gregory Machin
dev = tun0 ca = ca.crt key = greg.key remote = 192.168.1.1 1194 verb = 3 cipher = AES-128-CBC resolv-retry = infinite Many Thanks Greg -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za

Re: regex and parsing config file directives..

2006-07-14 Thread Gregory Machin
test.pl $VAR1 = { 'PREFORK_CHILDS' = '5', 'IP' = '1.2.3.4', 'MIN_SPARE_CHILDS' = 'nodefined', 'PORT' = '80' }; From: Gregory Machin [EMAIL PROTECTED] To: beginners@perl.org Subject: regex and parsing config file directives.. Date: Fri, 14 Jul 2006 11:18:40

Re: regex and parsing config file directives..

2006-07-14 Thread Gregory Machin
and the value ? -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za

Re: regex and parsing config file directives..

2006-07-14 Thread Gregory Machin
by a space into an array my $key = shift @array; gets the first value, of the array and sets key to this value $hash{$key} = [EMAIL PROTECTED] || 'nodefined'; ... sets the value of the hash to the array ?? } From: Gregory Machin [EMAIL PROTECTED] To: Jeff Peng [EMAIL PROTECTED

regex and parsing config file directives..

2006-07-10 Thread Gregory Machin
} = $_; } but I still end up with an empty field ... Any ideas.. -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za

Re: perl + ncurses turtorial ?

2006-07-07 Thread Gregory Machin
the source code.. with menus and windows and popups etc ... Thanks On 7/7/06, JupiterHost.Net [EMAIL PROTECTED] wrote: Gregory Machin wrote: Hi Hello, I'm looking for an perl ncuses tutorial so I can write a remote admin app to work via ssh .. Not really a tutorial but Curses::UI is what you

perl + ncurses turtorial ?

2006-07-06 Thread Gregory Machin
Hi I'm looking for an perl ncuses tutorial so I can write a remote admin app to work via ssh .. Many Thanks -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za