hello,
inputfile example:
userA:
userB:
userC:
userA:
awk -F: '$1 == "userA" {print "exists"}' inputfile
prints "exists" twice - I need to have it printed only once.
Is my "solution" OK and if yes, can it can be made yet shorter in awk basing on 1st command?:
awk -F: '$1 == "userA" {a=1} END{if(a){print "exists"}}' inputfile