i have little troube with VI i need to format me IP list file.
if i run this command the result arn't not like what i need.
#vi -b -c '%s/^.\{22}/' -c '%s/$/REJECT/' -c wq /etc/fail2ban/nixspam-ip.dump
Result:
166.151.58.56 ^MREJECT
200.119.204.58 ^MREJECT
and to delete this lines complet that beginn with "..." without any whitespace?but i Need
166.151.58.56 REJECT^M
200.119.204.58 REJECT^M
:sort
:g/^\...*/d
-> this Version will delete me a lot of more that i explain :-/
223.247.13.30 ^MREJECT
203.74.203.49 ^MREJECT
...505ce8c5f808cbae8af056b1956f8487 ^MREJECT
223.30.192.54 ^MREJECT
222.239.91.54 ^MREJECT
166.151.58.56 ^MREJECT
200.119.204.58 ^MREJECT
...6edf7e6e319cf3365eb39c78806ab5bb ^MREJECT
113.190.254.74 ^MREJECT
...77407d66817542a7b384e5927df10d45 ^MREJECT
thanks for any possible help!
Mauri