This script runs from a linux command line, but I would like to print the results to a web page. Can anyone help me alter it?
for i in cat /usr/local/apache/logs/access_log | grep default.ida | cut -d- -f1; do echo $i; done
cat /usr/local/apache/logs/access_log | grep default.ida | cut -d- -f1
Here's a way that works in my test. Note the command uses backticks. You really wouldn't want to call file() or other functions in PHP on a very large access_log.
echo "<pre>" . cat /www/logs/access_log | grep default.ida | awk '{print $1}' . "</pre>";
cat /www/logs/access_log | grep default.ida | awk '{print $1}'
Thanks!! You rock dude, that did the trick...