sh does not like "${patch:0:8}". Replaced by grep.