Coder Social home page Coder Social logo

headtail's Introduction

The ht command combines the head and tail programs.

There are currently two versions, ht-ugly and ht-argparse. They should work the same. Copy whichever you like to ht and use ht.

NAME

ht - (headtail) output the beginning and ending of files

SYNOPSIS

ht [OPTION]... [FILE]...

Print the beginning and ending of each file.
Prints '...' for omitted lines.
Defaults to first 10 and last 10 lines.
Standard input may be specified by - argument.
If no file is specified, uses standard input.

Prints header lines if more than one file.
    Prints a blank line between output of multiple files.

OPTIONS

-n, --lines=n
    Specify the number of lines from beginning and end of file to print.

--head-lines=n
    Specify the number of lines from beginning of file to print.

--tail-lines=n
    Specify the number of lines from end of file to print.

-v, --verbose
    Print headers.

-q, --quiet, --silent
    Do not print headers.

--help
    Show this and quit.

EXAMPLES

ls -ltr ~ | ht -20
    Shows first 20 and last 20 lines of output of previous command.

ht --head-lines=1 --tail-lines=3 *.py
    Shows first line and last three lines of each *.py file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.