Use this:
grep -m1 auir myfile.txt
This sed command
sed
sed -n '/auir/p' myfile.txt | head -1
solves your problem.
This might work for you:
sed '/auir/!d;q' file
or
sed -n '/auir/{p;q}' file