Probably easiest method: `cat some_file | grep '?' | cut -d'-' -f1`
* `cat somefile` => feed the contents of `some_file` into the pipe
* `grep '?'` => filter only lines containing a `?`
* `cut -d'-' -f1` => divide the string into fields with `-` as field separator, then print field #1