The R command provided by GNU sed is very similar to r with respect to most of the rules seen in an earlier tip. But instead of reading entire file contents, R will read one line at a time from the source file when the given address matches. If entire file has already been read and another address matches, sed will proceed as if the line was empty.