| Last change
                  on this file since 773 was
                  189,
                  checked in by jbarnold, 19 years ago | 
        
          | yoz rewrote logview.pl to do more streamlike processing | 
        
          | 
              
                  Property svn:executable set to
                  * | 
        | File size:
            481 bytes | 
      
      
        
  | Rev | Line |  | 
|---|
| [138] | 1 | #!/usr/bin/perl -T -w | 
|---|
|  | 2 |  | 
|---|
|  | 3 | %ENV = (); | 
|---|
|  | 4 | $ENV{'PATH'} = '/bin:/usr/bin'; | 
|---|
| [148] | 5 | my $elogsrc = '/home/logview/error_log'; | 
|---|
| [138] | 6 | # get by uid the caller's name to find the corresponding locker name | 
|---|
|  | 7 | my $caller = (getpwuid $<)[0]; | 
|---|
|  | 8 | $\ = "\n"; | 
|---|
|  | 9 |  | 
|---|
|  | 10 | print "--- Error logs for $caller ---"; | 
|---|
|  | 11 | open FOO, $elogsrc; | 
|---|
| [189] | 12 | while (<FOO>) { | 
|---|
|  | 13 | # Prevent deviousness, like web_scripts directories within web_scripts | 
|---|
|  | 14 | if (m|/afs/athena.mit.edu/| && | 
|---|
|  | 15 | m|/([^/]+)/web_scripts/| && $caller eq $1) { | 
|---|
|  | 16 | print; | 
|---|
|  | 17 | } | 
|---|
|  | 18 | } | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.