I am trying to call the scanimage command (from the SANE tool) from inside cygwin though I think that my problem is one of general escaping so maybe what I am calling doesn't matter. Anyway... The ...
I apply sed 's/^ bug*/__/' to ref bug bug ref and get ref __ __ ref The same is responded for perl, perl -ni -e 's/^ bug/__/; print'. Sample file can be downloaded ...