Skip to content

Instantly share code, notes, and snippets.

View mamclaughlin's full-sized avatar
🤷‍♀️
Eating crackers

Mariah mamclaughlin

🤷‍♀️
Eating crackers
  • Nextmv
  • Stars Hollow
View GitHub Profile
@mamclaughlin
mamclaughlin / duplicates.go
Last active January 9, 2020 21:41
Exercise 1.4 from "The Go Programming Language." Prints duplicate lines along with the file name and number of occurrences
/* To Run: go run duplicates.go <file1 file2 file3 ...>
Example Output:
test was found in the following files:
tester1.txt (3 times)
-----
asdf was found in the following files:
tester2.txt (5 times)
tester3.txt (2 times)
-----