Skip to content

Instantly share code, notes, and snippets.

View amtc131's full-sized avatar
🏠
Working from home

Alejandro amtc131

🏠
Working from home
View GitHub Profile
@amtc131
amtc131 / check_duplicate_lines.awk
Last active June 30, 2023 22:44
AWK Check for duplicate lines
awk 'seen[$0]++ { print "duplicate lines: " $0 }' file
@amtc131
amtc131 / Diff.awk
Last active June 30, 2023 22:55
Files with AWK
#! /bin/awk
# Here's an awk scrip that atttemps to set difference of two files based on their first column
# gawk -f Diff.awk file1.txt file2.txt
BEGIN{
OFS=FS="\t"
file = ARGV[1]
while (getline < file)
Contained[$1] = $1
delete ARGV[1]