I'm working on doing some basic file sorting on a web server running unix. I'm basically trying to keep track of a few basic things (hack attempts, what ip addresses connect and how often, how much they download, etc.) However, after sorting everything, I want to delete lines containing a certain ip address and/or the - character. However I just cannot figure out what command to use to accomplish this, here's what I have (assuming all log files are named access.log.x where x is a number):
Code:
        cut -d ' ' -f1 access*>tf2
	cut -d ' ' -f10 access*>tf1
	echo "Bandwidth usage by file size:">usage.rpt
	paste -d ' ' tf1 tf2 | sort -n -r  >>usage.rpt
                                         ^command to delete needed here
basically the first field from the apache log files is the ip address, and the tenth field is either the size downloaded in bytes or in case of a 404 error a - character. After pasting and sorting by file size in descending order I need to chop out those lines. I have everything accomplished up until deleting those lines, at which point im lost. Any suggestions?? Thank you very much.