Currently I have a folder with 4 files, one script.awk
script file, the gawk.exe
binary which runs the script and a report.csv
file in which the script reading the lines from, and one names.txt
file which contains usernames, one per line. Sometimes the names contain spaces, so occasionally they are actually two or more separate words, but there is strictly one username per line in the txt file. When I run my awk script, I store some of the data from the csv file in a variable called "name".
Now let's say name = "Pete", and I would like to check if whether the names.txt
file contains the username Pete or not, it has to be exactly "Pete", not like "Pete Sampras" etc., and when a match was found, I would like to take further action obviously.
The txt file contains about 500 lines like these:
leopanato
colan321
kamon mdp
BELLAM42