1. # have sed fetch all lines from a text file starting from the sixth line:
     sed -n '6,$p' file.txt 
    
  2. # append line i to line i+1 if line i+1 starts with $PATTERN:
     sed ':a;N;$!ba;s/\n$PATTERN/$PATTERN/g' file.txt 
    
  3. # a list of handy one-liners for the unix stream editor sed can be found at http://www.student.northpark.edu/pemente/sed/sed1line.txt