출력된 내용에서 처음 세 줄만 남기도록, cut 명령의 출력을 head 명령으로 파이핑한다.

    $ cut -f2 animals.txt | head -n3
    Programming Python
    SSH, The Secure Shell
    Intermediate Perl

    파일에서 여러 개의 필드를 골라 출력할 수도 있다. 출력할 필드의 번호를 콤마로 구분해 지정하면 된다.

    $ cut -f1,3 animals.txt | head -n3
    python  2010
    snail   2005
    alpaca  2012

    연속되는 필드라면 범위로 지정한다.

    $ cut -f2-4 animals.txt | head -n3
    Programming Python      2010  Lutz, Mark
    SSH, The Secure Shell   2005  Barrett, Daniel
    Intermediate Perl       2012  Schwartz, Randal
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.