Pattern usually means inside a file .
There are some command --help that uses PATTERN for the filename .
In this case
grep -n -i -E 'uliXYZ|samanthaABC' /Path/To/File/Filename.txt
should do it .
head uliXYZ would return the first 10 lines of the file uliXYZ , not the content uliXYZ .
If you only want the first 10 lines use "grep -m 10" or "grep -A 10" .
Read "grep --help" and "man grep" .
You can also filter it through grep like
cat infile | grep 'uliXYZ'