I assume you are trying to run SHOW SLAVE STATUS
at the dos prompt and then extract the Last_SQL_Error
values. If that's correct then you should probably use findstr
, not find
. Something like this:
mysql -e "show slave status\G" | findstr "Last_SQL_Error"