1

This question was a puzzling one: instructing sed to read a script file, upon which it signals a Bad Flag. It turned out that the script file was in little endian Unicode 16, a format that all editors I used (including Vim) read without issues, but that sed cannot interpret; it requires ASCII. User jerry helpfully offered a method to determine file format, which solved the issue.

The question was downvoted. When I linger on the downvote link, it states: "This question does not show any research effort, it is unclear or not useful". This leaves me wondering: How do I improve it?

3
  • I was halfway through writing a long winded answer here, when I found a very useful duplicate for your question there. I have suggested the duplicate. Basically what your question boils down to is using Windows new line characters as input on a *nix based system.
    – user4639281
    Apr 22, 2017 at 1:56
  • Yes that was indeed the issue - the first layer of it. This was offered as an answer by myself, then @jerry identified the lingering remainder: once all Windows CRs were substituted for Unix ones, there still was an underlying issue that could not be fixed by the solutions in your suggested duplicate. No amount of troubleshooting on my mac could find the cause of why sed still threw an error. dos2unix only changed the CRs, not the file format.
    – Koyovis
    Apr 22, 2017 at 4:21
  • I think it is downvoted because of the "This question does not show any research effort" part: it is an exact duplicate of an existing one. Furthermore, you only have one downvote, I don't think it deserves a Meta post...
    – Mistalis
    Apr 24, 2017 at 12:16

0

You must log in to answer this question.

Browse other questions tagged .