i am wanting to check that the first line of a file to see if it contains only "X", if it contains somthing other then "X" on the first line then i want to echo "yes" if not echo "no"
for example:

the first line in a file is `XXXXXXX` i need the output to be yes

additionally how can i do this with the last line as well ?