![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calling a perl script from a perl script | new2ss | Shell Programming and Scripting | 6 | 05-24-2009 06:03 PM |
| How to Turn perl one-liners into full perl script? | EDALBNUG | UNIX for Dummies Questions & Answers | 1 | 02-04-2009 10:49 AM |
| [Perl] Accessing array elements within a sed command in Perl script | userix | Shell Programming and Scripting | 2 | 10-03-2008 01:05 PM |
| here document to automate perl script that call script | hogger84 | Shell Programming and Scripting | 3 | 10-22-2007 11:15 AM |
| Perl: Run perl script in the current process | vino | Shell Programming and Scripting | 10 | 12-09-2005 10:45 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
perl script help
Hi, I am writing a perl script and need some in extracting some data. Basically it is a Log Analyzer and there are multiple log files from where the data comes. i am done with the grep part of the userID with this code- Code:
#!/usr/bin/perl -w open(VALUE, "< arcotwebfort_20May09_00_03_55.log"); @stock = <VALUE>; @matches = (grep(/$username/, @stock)); print @matches; it gave me this output-- i got the sessionID's from this,they are-10088781,10088815. like this there are plenty of sessionID related to a single user. i collected this information in an array @matches. now i want to take sessionID's from this array and search for the sessionID in the logfile which AuthMechanism it belongs to. There are three-four AuthMechanism to which a user can belong.they are-- QnAModule::authenticate UPAuthModule::authenticate UPAuthModule::authenticate On the basis of these mechanisms i need to know the user belongs to which mechanism. This part is very tricky for me and i am stuck here as i am not well wersed with Perl and learning it. I will upload my logfile. please suggest me to proceed further. If my questions are not clear to you please let me know i will try to explain them better.Please help me in proceeding further, i am also trying to write it myself. What i want is what the given user is doing in the session id and the session id is related to which mechanism. So let say my script takes username as arguememnt, i am able to print all the information that is related to that user with sessionID's. this sessionID is related to diffrent Authentication mechanism mentioned earlier.The user can belong to any or all mechanisms.my basic criteria is that the user belongs to which mechanism and he is doing what(data related to the username in mechanisms) The output should be like this-- say i gave the input username as 01018603, i will be able to get the output as-- the example belongs to one AuthMechanism ie QnA Quote:
NT Last edited by namishtiwari; 06-12-2009 at 06:53 AM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|