You are not saving the books file which you read as one string at line 3 anywhere. Why are you splitting then input from user for title from '/'? Your example seems not allow '/' in title as it separates author from title.
But I am not sure user can be able to give exactly same format, maybe only Family name of author, then wouldn't it be actually more usefull to show what there is in the line matching instead of echoing back the search string? So you should iterate the file line by line for matches.