You can use read-line for this:
CL-USER> (equalp (read-line) "same") same T
read will return the character:
CL-USER> (type-of (read)) same SYMBOL
From Hyperspec :
read parses the printed representation of the object from the input stream and creates such an object.
You just want to read a string, while read parses the input and constructs Lisp objects from it.
To get the lines from read , you will need to use the "printed representation" of the lines, i.e. put them in double quotes:
CL-USER> (equalp (read) "same") "same" T
(BTW: to compare strings, string= ; equalp will ignore case.)
source share