trainee-go-head

command module
v0.0.0-...-912a5fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2020 License: GPL-2.0 Imports: 5 Imported by: 0

README

trainee-head

About

trainee-head is a from scratch developed program which outputs the first 10 lines of a file you specify. Seen like this it's an imitation of the original head command line command.

Parameters

Parameter Usage
-n Define how many lines should be printed.

Usage Examples

In the following you'll see a quick example of how to use the head command. Here is what our text file looks like:

in.txt:

            one
            two
            three
            four
            five
            six
            seven
            eight
            nine
            ten
            eleven
            twelve

To print the first 10 lines of in.txt run ./head.linux-amd64 < in.txt

The output is:

            one
            two
            three
            four
            five
            six
            seven
            eight
            nine
            ten

If you want to choose more than one file run ./head.linux-amd64 in.txt in2.txt in3.txt ...

To print e.g the first 5 lines use the -n parameter ./head.linux-amd64 -n 5 in.txt

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL