I am pretty new to UNIX.
I am trying to replace
maxretry = * in the fail2ban config file with
maxtretry = 3, so that every single packages has max. three retries until the ip is blocked.
I know that there tons of questions about
sed, but I didn't find any which answered my question.
sed as the following:
sed -i 's/old-word/new-word/g' /etc/fail2ban/config.local
(I forgot the local config file Name)
sed is powerful, but I didn't understand it. It replaces strings with regex, but creating a regex is pretty hard for me.
sed -i 's/"maxretry = *"/"maxretry = 3"/g' /etc/fail2ban/config.local
As I excepted nothing was changed.
Can someone help me to understand
sed? Exspecially with a placeholder like * for any Kind of number/numbers.