diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2011-02-10 21:28:16 -0500 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2011-02-10 21:28:16 -0500 |
commit | 1ef934cf30aef2b2153bd68e67e7e7860f383bc7 (patch) | |
tree | 9609a4d04884727b764381af3f9930ba8f30d251 | |
parent | Standardize help text. (diff) | |
download | lastlog-1ef934cf30aef2b2153bd68e67e7e7860f383bc7.tar.xz lastlog-1ef934cf30aef2b2153bd68e67e7e7860f383bc7.zip |
Add rudimentry host filter.
-rwxr-xr-x | filterhost | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/filterhost b/filterhost new file mode 100755 index 0000000..9d324e9 --- /dev/null +++ b/filterhost @@ -0,0 +1,6 @@ +#!/bin/sh + +temp=$(mktemp --tmpdir=$(dirname "$0") .utmp.XXXXXXXXXX) +./utmpr -b "$2" | grep -v "^.* .* .* .* .* .*$1.*$" | ./utmpr -t -o "$temp" +cat "$temp" > "$2" +rm -f "$temp" |