syntax error near unexpected token `$'inr''












34















I'm trying to compile the NIST Biometric Image Software, and I have been having trouble all day. I finally got the source checked out right, and I installed cygwin with no problems (I have used it in the past), but when I went to compile, I get this error:



 $  sh setup.sh </cygdrive/c/NBIS> [--without-X11]
setup.sh: line 94: syntax error near unexpected token `$'inr''
'etup.sh: line 94: ` case $1 in


Now I'm sure any advanced coder would head to the setup.sh and look for problems, but I'm not really much of a coder (I'm only compiling this because there are no pre-compiled packages) so I don't know what to do. I didn't install any libraries with cygwin, I just left everything default. I'm trying to follow the NBIS manual, but I don't really understand it that well and so I'm struggling badly. Maybye taking a look at it you may notice something I missed: http://www.nist.gov/customcf/get_pdf.cfm?pub_id=51097










share|improve this question



























    34















    I'm trying to compile the NIST Biometric Image Software, and I have been having trouble all day. I finally got the source checked out right, and I installed cygwin with no problems (I have used it in the past), but when I went to compile, I get this error:



     $  sh setup.sh </cygdrive/c/NBIS> [--without-X11]
    setup.sh: line 94: syntax error near unexpected token `$'inr''
    'etup.sh: line 94: ` case $1 in


    Now I'm sure any advanced coder would head to the setup.sh and look for problems, but I'm not really much of a coder (I'm only compiling this because there are no pre-compiled packages) so I don't know what to do. I didn't install any libraries with cygwin, I just left everything default. I'm trying to follow the NBIS manual, but I don't really understand it that well and so I'm struggling badly. Maybye taking a look at it you may notice something I missed: http://www.nist.gov/customcf/get_pdf.cfm?pub_id=51097










    share|improve this question

























      34












      34








      34


      10






      I'm trying to compile the NIST Biometric Image Software, and I have been having trouble all day. I finally got the source checked out right, and I installed cygwin with no problems (I have used it in the past), but when I went to compile, I get this error:



       $  sh setup.sh </cygdrive/c/NBIS> [--without-X11]
      setup.sh: line 94: syntax error near unexpected token `$'inr''
      'etup.sh: line 94: ` case $1 in


      Now I'm sure any advanced coder would head to the setup.sh and look for problems, but I'm not really much of a coder (I'm only compiling this because there are no pre-compiled packages) so I don't know what to do. I didn't install any libraries with cygwin, I just left everything default. I'm trying to follow the NBIS manual, but I don't really understand it that well and so I'm struggling badly. Maybye taking a look at it you may notice something I missed: http://www.nist.gov/customcf/get_pdf.cfm?pub_id=51097










      share|improve this question














      I'm trying to compile the NIST Biometric Image Software, and I have been having trouble all day. I finally got the source checked out right, and I installed cygwin with no problems (I have used it in the past), but when I went to compile, I get this error:



       $  sh setup.sh </cygdrive/c/NBIS> [--without-X11]
      setup.sh: line 94: syntax error near unexpected token `$'inr''
      'etup.sh: line 94: ` case $1 in


      Now I'm sure any advanced coder would head to the setup.sh and look for problems, but I'm not really much of a coder (I'm only compiling this because there are no pre-compiled packages) so I don't know what to do. I didn't install any libraries with cygwin, I just left everything default. I'm trying to follow the NBIS manual, but I don't really understand it that well and so I'm struggling badly. Maybye taking a look at it you may notice something I missed: http://www.nist.gov/customcf/get_pdf.cfm?pub_id=51097







      cygwin syntax-error token biometrics






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 24 '11 at 21:05









      DavidDavid

      181124




      181124
























          4 Answers
          4






          active

          oldest

          votes


















          47














          To convert setup.sh to Unix line endings on Cygwin, use



          dos2unix setup.sh





          share|improve this answer































            28














            run



            sed -i 's/r//' setup.sh


            to fix your line endings






            share|improve this answer

































              13














              Easy way to convert example.sh file to unix is use NotePad++ (Edit>EOL Conversion>UNIX/OSX Format)



              You can also set the default EOL in notepad++ (Settings>Preferences>New Document/Default Directory>select Unix/OSX under the Format box)






              share|improve this answer
























              • Thanks, worked for me. I encountered this as I was compiling Shell scripts on Linux Ubuntu Subsystem in Windows 10 but typing the commands in notepad++ instead of vim or via nano.

                – Joshua Cariño
                Mar 14 at 19:53



















              7














              Windows uses two characters (CR and LF, or rn) to mark the end of a line in a text file. Unix, Linux, and (by default) Cygwin use a single LF or 'n' character. Some Cygwin tools are able to deal with either format, but sh typically can't.



              It looks like setup.sh uses Windows-style line endings -- or at least line 94 does.



              I didn't find the download for the sources, but if they're distributed as a zip file, you might need to extract them using the Cygwin unzip command with the -a option, so any line endings are automatically converted.



              But I suspect there's more to it than that. The distributed setup.sh file shouldn't have had any Windows-style line endings in the first place, and if it did, I don't know why the problem wouldn't show up until line 94.



              If you can post the URL for the source download, I'll take a look at setup.exe.






              share|improve this answer























                Your Answer






                StackExchange.ifUsing("editor", function () {
                StackExchange.using("externalEditor", function () {
                StackExchange.using("snippets", function () {
                StackExchange.snippets.init();
                });
                });
                }, "code-snippets");

                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "1"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f6473766%2fsyntax-error-near-unexpected-token-in-r%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                47














                To convert setup.sh to Unix line endings on Cygwin, use



                dos2unix setup.sh





                share|improve this answer




























                  47














                  To convert setup.sh to Unix line endings on Cygwin, use



                  dos2unix setup.sh





                  share|improve this answer


























                    47












                    47








                    47







                    To convert setup.sh to Unix line endings on Cygwin, use



                    dos2unix setup.sh





                    share|improve this answer













                    To convert setup.sh to Unix line endings on Cygwin, use



                    dos2unix setup.sh






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 4 '12 at 15:08









                    JensJens

                    50.9k1489132




                    50.9k1489132

























                        28














                        run



                        sed -i 's/r//' setup.sh


                        to fix your line endings






                        share|improve this answer






























                          28














                          run



                          sed -i 's/r//' setup.sh


                          to fix your line endings






                          share|improve this answer




























                            28












                            28








                            28







                            run



                            sed -i 's/r//' setup.sh


                            to fix your line endings






                            share|improve this answer















                            run



                            sed -i 's/r//' setup.sh


                            to fix your line endings







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited May 29 '18 at 19:01









                            Keith Thompson

                            194k26290484




                            194k26290484










                            answered May 29 '16 at 12:42









                            Frank HaywardFrank Hayward

                            44747




                            44747























                                13














                                Easy way to convert example.sh file to unix is use NotePad++ (Edit>EOL Conversion>UNIX/OSX Format)



                                You can also set the default EOL in notepad++ (Settings>Preferences>New Document/Default Directory>select Unix/OSX under the Format box)






                                share|improve this answer
























                                • Thanks, worked for me. I encountered this as I was compiling Shell scripts on Linux Ubuntu Subsystem in Windows 10 but typing the commands in notepad++ instead of vim or via nano.

                                  – Joshua Cariño
                                  Mar 14 at 19:53
















                                13














                                Easy way to convert example.sh file to unix is use NotePad++ (Edit>EOL Conversion>UNIX/OSX Format)



                                You can also set the default EOL in notepad++ (Settings>Preferences>New Document/Default Directory>select Unix/OSX under the Format box)






                                share|improve this answer
























                                • Thanks, worked for me. I encountered this as I was compiling Shell scripts on Linux Ubuntu Subsystem in Windows 10 but typing the commands in notepad++ instead of vim or via nano.

                                  – Joshua Cariño
                                  Mar 14 at 19:53














                                13












                                13








                                13







                                Easy way to convert example.sh file to unix is use NotePad++ (Edit>EOL Conversion>UNIX/OSX Format)



                                You can also set the default EOL in notepad++ (Settings>Preferences>New Document/Default Directory>select Unix/OSX under the Format box)






                                share|improve this answer













                                Easy way to convert example.sh file to unix is use NotePad++ (Edit>EOL Conversion>UNIX/OSX Format)



                                You can also set the default EOL in notepad++ (Settings>Preferences>New Document/Default Directory>select Unix/OSX under the Format box)







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered May 13 '15 at 9:18









                                EftekhariEftekhari

                                1,2951428




                                1,2951428













                                • Thanks, worked for me. I encountered this as I was compiling Shell scripts on Linux Ubuntu Subsystem in Windows 10 but typing the commands in notepad++ instead of vim or via nano.

                                  – Joshua Cariño
                                  Mar 14 at 19:53



















                                • Thanks, worked for me. I encountered this as I was compiling Shell scripts on Linux Ubuntu Subsystem in Windows 10 but typing the commands in notepad++ instead of vim or via nano.

                                  – Joshua Cariño
                                  Mar 14 at 19:53

















                                Thanks, worked for me. I encountered this as I was compiling Shell scripts on Linux Ubuntu Subsystem in Windows 10 but typing the commands in notepad++ instead of vim or via nano.

                                – Joshua Cariño
                                Mar 14 at 19:53





                                Thanks, worked for me. I encountered this as I was compiling Shell scripts on Linux Ubuntu Subsystem in Windows 10 but typing the commands in notepad++ instead of vim or via nano.

                                – Joshua Cariño
                                Mar 14 at 19:53











                                7














                                Windows uses two characters (CR and LF, or rn) to mark the end of a line in a text file. Unix, Linux, and (by default) Cygwin use a single LF or 'n' character. Some Cygwin tools are able to deal with either format, but sh typically can't.



                                It looks like setup.sh uses Windows-style line endings -- or at least line 94 does.



                                I didn't find the download for the sources, but if they're distributed as a zip file, you might need to extract them using the Cygwin unzip command with the -a option, so any line endings are automatically converted.



                                But I suspect there's more to it than that. The distributed setup.sh file shouldn't have had any Windows-style line endings in the first place, and if it did, I don't know why the problem wouldn't show up until line 94.



                                If you can post the URL for the source download, I'll take a look at setup.exe.






                                share|improve this answer




























                                  7














                                  Windows uses two characters (CR and LF, or rn) to mark the end of a line in a text file. Unix, Linux, and (by default) Cygwin use a single LF or 'n' character. Some Cygwin tools are able to deal with either format, but sh typically can't.



                                  It looks like setup.sh uses Windows-style line endings -- or at least line 94 does.



                                  I didn't find the download for the sources, but if they're distributed as a zip file, you might need to extract them using the Cygwin unzip command with the -a option, so any line endings are automatically converted.



                                  But I suspect there's more to it than that. The distributed setup.sh file shouldn't have had any Windows-style line endings in the first place, and if it did, I don't know why the problem wouldn't show up until line 94.



                                  If you can post the URL for the source download, I'll take a look at setup.exe.






                                  share|improve this answer


























                                    7












                                    7








                                    7







                                    Windows uses two characters (CR and LF, or rn) to mark the end of a line in a text file. Unix, Linux, and (by default) Cygwin use a single LF or 'n' character. Some Cygwin tools are able to deal with either format, but sh typically can't.



                                    It looks like setup.sh uses Windows-style line endings -- or at least line 94 does.



                                    I didn't find the download for the sources, but if they're distributed as a zip file, you might need to extract them using the Cygwin unzip command with the -a option, so any line endings are automatically converted.



                                    But I suspect there's more to it than that. The distributed setup.sh file shouldn't have had any Windows-style line endings in the first place, and if it did, I don't know why the problem wouldn't show up until line 94.



                                    If you can post the URL for the source download, I'll take a look at setup.exe.






                                    share|improve this answer













                                    Windows uses two characters (CR and LF, or rn) to mark the end of a line in a text file. Unix, Linux, and (by default) Cygwin use a single LF or 'n' character. Some Cygwin tools are able to deal with either format, but sh typically can't.



                                    It looks like setup.sh uses Windows-style line endings -- or at least line 94 does.



                                    I didn't find the download for the sources, but if they're distributed as a zip file, you might need to extract them using the Cygwin unzip command with the -a option, so any line endings are automatically converted.



                                    But I suspect there's more to it than that. The distributed setup.sh file shouldn't have had any Windows-style line endings in the first place, and if it did, I don't know why the problem wouldn't show up until line 94.



                                    If you can post the URL for the source download, I'll take a look at setup.exe.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Aug 24 '11 at 1:30









                                    Keith ThompsonKeith Thompson

                                    194k26290484




                                    194k26290484






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Stack Overflow!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f6473766%2fsyntax-error-near-unexpected-token-in-r%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        MongoDB - Not Authorized To Execute Command

                                        How to fix TextFormField cause rebuild widget in Flutter

                                        Npm cannot find a required file even through it is in the searched directory