sed G myfile.txt > newfile.txt
Double-spaces the contents of file myfile.txt, and writes the output to the filenewfile.txt.
sed = myfile.txt | sed 'N;s/\n/\. /'
Prefixes each line of myfile.txt with a line number, a period, and a space, and displays the output.
sed 's/test/example/g' myfile.txt > newfile.txt
Searches for the word "test" in myfile.txt and replaces every occurrence with the word "example".
sed -n '$=' myfile.txt
Counts the number of lines in myfile.txt and displays the results.
sed -i.bak '/text/d' myfile.txt
Removes all lines containing 'text' from myfile.txt