Michael Taboada wrote:

> I actually do it like this:
> ./unban 12.34.56.78
> and it still erases everything.

OK, then the problem is something else.

Have you tested each line of the script?  Not on the actual files, just
on test files, for instance:

$ cat /etc/hosts
...
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host
...
$ sed "/.*38.25.63.10.*/d" /etc/hosts
...
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server

So I see it deleted the line I wanted deleted.

In fact you should add -x to the script's first line to see what it
really is doing.

The script seems fine on a quick look, only things I would change are
all those superflous redirections, and yes like somebody else
recommended, I would use -i and not write directly to the same file I'm
reading (which is something not guaranteed to work in all possible
environments).
-- 
René Berber


------------------------------------------------------------------------------
_______________________________________________
Denyhosts-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/denyhosts-user

Reply via email to