Using ed on the "file" below (beginning with "stu_f_name Sam"), g/stu_f//stu_f/,/stu_f/+1j joins the first and last names of the first two "records" but not the last. Why doesn't it do the entire job? stu_f_name Sam Hazeltine phone 939393 ssn 030303030 stu_f_name Joe Waters phone 93939 ssn 030303030 stu_f_name Joe Waters phone 93939 ssn 030303030