Re: Re: [SLUG] Fun with perl

From: awyatt@bbsgamers.com
Date: Fri Mar 22 2002 - 16:10:20 EST


$ARGV[0];
$ARGV[1];

etc..

You Wrote:

Date: Fri, 22 Mar 2002 15:13:11 -0500
From: "Brett Simpson" <Simpsonb@hillsboroughcounty.org>
To: <slug@nks.net>
Subject: Re: [SLUG] Fun with perl

I figured it out. I used

print "Content-Type: text/plain \n\n";

Now does anyone know how I can add some sort of user input to this script? Let's say for example I want the user to be able to specify other users besides joeuser from the web browser. I know with bash you can use a $1 in the script so that when you execute ./testscript.sh myuser it will replace $1 with myuser.

>>> Simpsonb@hillsboroughcounty.org 03/22/02 02:50PM >>>
I'm looking to use this script in my apache cgi-bin so that users can list specific contents of a file in their web browser. It works ok except that it jumbles the lines togethor. Is there a cleaner way to do this so that it looks readable?

#!/usr/bin/perl
print "Content-Type: text/html \n\n";

print `cat -b /var/www/html/auth.log | grep joeuser`;

Brett

--
This message has been 'sanitized'. This means that potentially
dangerous content has been rewritten or removed. The following
log describes which actions were taken.

Sanitizer (start="1016827765"):
SanitizeFile (filename="unnamed.txt", mimetype="text/plain"):
Match (rule="default"):
Enforced policy: accept

Defanged UNIX shell script(s).
Total modifications so far: 1

Anomy 0.0.0 : Sanitizer.pm
$Id: Sanitizer.pm,v 1.51 2002/01/04 19:55:10 bre Exp $



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:29:31 EDT