Given a file that has lines such as:

```
 1. 1
 2. 2
 3. 3
 4. 4
 5. 5

```

And I run the 'sed' command:

```
sed -i "/4/a\text\" filename.txt

```

The file ends up as:

```
 1. 1
 2. 2
 3. 3
 4. text
 5. 4

```

The line stating '5' is now gone. 

The last line seems to have been pushed off, as if the number of lines in the file was not changed.

I have run the command without the '-i' flag, which stands for 'insert in place'. 

```
sed "/3/a\text\" filename.txt > temp.txt; mv temp.txt filename.txt;

```

But received the same effect, even though an 'in place' flag was not specified. Is this 'sed's intended function? Is there a way to allow lines to be added?