Hey all, I'm looking to make a quick (good looks not necessary) form which will take my argument and parse it out of a logfile, then print it back to the page I entered the command on...
Think of grep 20060925 /var/log/messages where in a little form I can enter the date. However, boolean grep would be nice too... E.g. grep 2006* /var/log/messages. Just unsure how to get my argument parsed into a page correctly... Any help?
<?php
echo '<pre>';
$found = system('grep $ARG /var/log/messages', $retval);
echo '
</pre>
<hr />Found: ' . $found . '
<hr />Return value: ' . $retval;
?>
perl -e 'print $i=pack(c5,(40*2),sqrt(7600),(unpack(c,Q)-3+1+3+3-7),oct(104),10,oct(101));'
Think of grep 20060925 /var/log/messages where in a little form I can enter the date. However, boolean grep would be nice too... E.g. grep 2006* /var/log/messages. Just unsure how to get my argument parsed into a page correctly... Any help?
<?php
echo '<pre>';
$found = system('grep $ARG /var/log/messages', $retval);
echo '
</pre>
<hr />Found: ' . $found . '
<hr />Return value: ' . $retval;
?>
perl -e 'print $i=pack(c5,(40*2),sqrt(7600),(unpack(c,Q)-3+1+3+3-7),oct(104),10,oct(101));'