0

I had to use OCR to get the text of a very large script I did not want to type by hand.

I have multiple lines like this

echo "<91>ps <97>eF|grep...

It should read;

echo "`ps -eF|grep...

Even with ":set list" the only thing I see is <91> and <97>

I tried this and other ASCII characters to insert the back quote:

sed -e 's/'$(echo "97")'/`/g'

to no avail.

Either I'm doing this all wrong or using the wrong control values.

Can you suggest something else?

  • what does hexdump or xxd show for the relevant contents of the script? – thrig Jun 27 '18 at 18:39
  • 0000002896 | ".ps .eF|grep "| – Marinaio Jun 27 '18 at 19:15
  • Are they periods? – Marinaio Jun 27 '18 at 19:15
-1

Looks like cp1252 (or similar). See What characters do not directly map from Cp1252 to UTF-8?. Use recode to repair it...

  • Thanks. Unfortunately recode isn't available on my system (neither is installing it) – Marinaio Jun 28 '18 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.