Theo Pepler

Home | Research | Teaching | Software | Links | HOWTO's

HOWTO: DISPLAY ONLY SPECIFIC LINES FROM A TEXT FILE

  1. To display only lines 20 to 40 from a file called myfile.txt, for example, use

    sed -n '20, 40p;41q' myfile.txt

    from the command line.