:start #Append the line to hold space H # If at the last line jump to print $ b print #Proceed on next line n # otherwise jump to start b start :print #replace patternspace with holdspace g #print patternspace p