tokenless wget scripts contain LRCR line terminations making them unexecutable on unix

XMLWordPrintable

    • Type: Defect
    • Resolution: Done
    • Priority: Minor
    • 1.2.0
    • Affects Version/s: 1.2.0-BETA2
    • Component/s: Data Download
    • None

      A tokenless wget script uses dos-line termination characters. This interferes with execution by /bin/sh on linux in two ways that are not easy to detect:

      1. making the script executable doesn't work

        $ chmod u+x wget-download.txt.orig
        $ ./wget-download.txt.orig
        bash: ./wget-download.txt.orig: /bin/sh^M: bad interpreter: No such file or directory

      2. sh flags a mysterious syntax error when invoked

        $ sh wget-download.txt.orig
        : not foundad.txt.orig: 5:
        wget-download.txt.orig: 10: Syntax error: "elif" unexpected (expecting "then")

      This error is really difficult to detect because the script looks normal.

              Assignee:
              Nathan Wilhelmi (Inactive)
              Reporter:
              Stephen Pascoe (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: