#simple script that sends the log summary by mail (echo "Subject: referlog"; cat referlog.txt | cut -d / -f 3 | freq) | sendmail [email protected] ========================== # simple CGI script in bash #!/usr/local/bin/bash echo "Content-type: text/html" echo echo "here we are again" =========================== #!/usr/bin/perl ###################### #unwebify $buffer = <ARGV>; # Split the name=value pairs @pairs = split(/&/, $buffer); foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair);
# Un-Webify plus signs and %-encoding
$pair =~ tr/+/ /;
$pair =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
# Print the outputvalue pair. print "$pair\n"; } |