sed - print lines between patterns string1 and string2

sed can also work on pattern ranges. To print from lines between patterns root and dmitritelinov:

sed -n '/root/,/dmitritelinov/p' /etc/passwd
To print the lines from pattern dmitritelinov till the end of the file:
sed -n '/dmitritelinov/,$p' /etc/passwd
Similarly, to print contents from the beginning of the file till the pattern dmitritelinov:
sed -n '1,/dmitritelinov/p' /etc/passwd