dup3

command
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Dup3 prints the count and text of lines that appear more than once in the named input files. It reads in entire file at once ("slurp" mode). Adapted from github.com/adonovan/gopl.io/tree/master/ch1/dup3.

os.ReadFile (dup3) and bufio.Scanner (dup2) use the Read and Write methods of *os.File under covers.

Level: beginner Topics: io, maps, os.ReadFile, strings.Split

Jump to

Keyboard shortcuts

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