On May 3, 2006, at 10:23 AM, Eric Martin wrote: > Lets "assume" I don't know how to do this. would you be able to > walk me > through a little. I've only used the cat command to view files and > haven't > used sort before.
Let's say you have two files hosts.deny.01 and hosts.deny.02. To concatenate the two files, you can do the following: cat hosts.deny.01 hosts.deny.02 > hosts.deny The resulting hosts.deny file will look as though you appended file hosts.deny.02 to the bottom of file hosts.deny.01. To generate a unique set of sshd entries: cat hosts.deny.01 hosts.deny.02 | sort | uniq > hosts.deny Alternatively, you can use grep to remove the lines with hash marks to generate a clean list: grep -h -v '^ *#' hosts.deny.* | sort -t. -n | uniq > hosts.deny If you have more questions, please feel free to ask. Regards, - Robert http://www.cwelug.org/downloads Help others get OpenSource software. Distribute FLOSS for Windows, Linux, *BSD, and MacOS X with BitTorrent _______________________________________________ CWE-LUG mailing list [email protected] http://www.cwelug.org/ http://www.cwelug.org/archives/ http://www.cwelug.org/mailinglist/
