I try to replace a character, 2 lines after matching pattern. For this, I'm using this code:
sed '/some_pattern/{N;N;s/word1/word2/}' /etc/filesystems > /etc/filesystems.tmp && mv -f /etc/filesystems.tmp /etc/filesystems
I tested this command and confirmed it's working fine on Linux. However, when I use it in AIX, I receive an error message like:
sed: Function /some_pattern/{N;N;s/word1/word2/} cannot be parsed.
Any idea?