trainee-go-tail

command module
v0.0.0-...-a39d840 Latest Latest
Warning

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

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

README

trainee-tail

About

trainee-tail is a from scratch developed program which outputs the last 10 lines of a file you specify. Seen like this it's an imitation of the original tail 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 tail command. Here is what our text file looks like:

in.txt:

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

To print the last 10 lines of in.txt run ./tail.linux-amd64 < in.txt

The output is:

            five
            six
            seven
            eight
            nine
            ten
            eleven
            twelve
            thirteen
            fourteen

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

To print e.g the last 5 lines use the -n parameter ./tail.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