Some of my systems are logging this error:

su: pam_env(su:session): Unable to open env file: /etc/default/locale: No such file or directory

I already had the “locales” package installed, to create the file:

dpkg-reconfigure locales

Follow the prompts to choose your locale(s). Result:

cat /etc/default/locale
#  File generated by update-locale
LANG=en_US.UTF-8

Let’s say we’ve got:

$ cat file.txt
1
2
3
4
5
6
7
blah
blah blah
append after me
blah bleh!
append after me
blah blah blah
bleeeh

This will add “new stuff” after every line that says “append after me”:

$ sed -i '/append after me/a new stuff' file.txt

Bingo:

$ cat file.txt
1
2
3
4
5
6
7
8
9
blah
blah blah
append after me
new stuff
blah bleh!
append after me
new stuff
blah blah blah
bleeeh