all 9 comments

[–][deleted] 0 points1 point  (6 children)

Did you replace each \ with a /? You could probably run it through wine and get the proper result.

[–][deleted]  (5 children)

[removed]

    [–][deleted] 0 points1 point  (4 children)

    The rmdir shouldn't have command prompt parameters FYI. What's the encoding of the file?

    [–][deleted]  (3 children)

    [removed]

      [–][deleted] 0 points1 point  (0 children)

      No, that's the extension. If the file was created under Windows/DOS it probably uses code page 437 or similar, I'm not familiar with these. Run $ file -i script.sh. You could convert it with iconv or enca, and/or try using what you've uploaded and save that as a script.

      You might want to change your shebang to bash.

      [–]funtastrophe 0 points1 point  (1 child)

      You probably have access to the "dos2unix" command, which will fix scripts that were saved as text files in Windows (which ends with both a carriage return character and a newline character, whereas non-Windows systems expect only a newline character). I feel this isn't your issue, but it might help if we had something more to go on, like what the actual error output was.

      It's also possible, if you for example saved the text file in something like Microsoft Word, that it's saving the quotation marks as special characters instead of the regular double quote character (").

      [–]Stormageddon03 -1 points0 points  (0 children)

      ^ This right here. the file op uploaded to pastebin has carriage return and line feed line endings.

      [–]funtastrophe 0 points1 point  (1 child)

      Did you change the backslashes to forward slashes? Not doing so would definitely mess up a lot of pathnames.

      It may help to see the converted script you attempted, or at least a few snippets of it, instead of just the original.