Let's have some file: echo xxx > some_file echo yyy >> some_file Now let's try to edit it with ed, lines starting from '>' are manual input: > ed some_file 8 > H > = 2 > g/yyy/d > = 2 > g/xxx/d > = 0 > g/zzz/d ? invalid address When last line is removed from file current address is changed from 1 to 0 making all subsequent range addressing to fail. This violates the man page: Since the g (global) command masks any errors from failed searches and substitutions, it can be used to perform conditional operations in scripts; -- What I mean is that actually using g (global) is not fully safe. Imagine I have a number of key fingerprints and I want to create a simple script to remove them from 'known_hosts' throughout all of my machines. There are a lot of fingerprints but each known_hosts file can contain only a few of them thus script may fail when file is running out of lines.
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped