syntax error near unexpected token `$'inr''
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
add a comment |
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
add a comment |
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
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
cygwin syntax-error token biometrics
asked Jun 24 '11 at 21:05
DavidDavid
181124
181124
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
To convert setup.sh
to Unix line endings on Cygwin, use
dos2unix setup.sh
add a comment |
run
sed -i 's/r//' setup.sh
to fix your line endings
add a comment |
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)
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
add a comment |
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
.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
To convert setup.sh
to Unix line endings on Cygwin, use
dos2unix setup.sh
add a comment |
To convert setup.sh
to Unix line endings on Cygwin, use
dos2unix setup.sh
add a comment |
To convert setup.sh
to Unix line endings on Cygwin, use
dos2unix setup.sh
To convert setup.sh
to Unix line endings on Cygwin, use
dos2unix setup.sh
answered May 4 '12 at 15:08
JensJens
50.9k1489132
50.9k1489132
add a comment |
add a comment |
run
sed -i 's/r//' setup.sh
to fix your line endings
add a comment |
run
sed -i 's/r//' setup.sh
to fix your line endings
add a comment |
run
sed -i 's/r//' setup.sh
to fix your line endings
run
sed -i 's/r//' setup.sh
to fix your line endings
edited May 29 '18 at 19:01
Keith Thompson
194k26290484
194k26290484
answered May 29 '16 at 12:42
Frank HaywardFrank Hayward
44747
44747
add a comment |
add a comment |
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)
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
add a comment |
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)
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
add a comment |
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)
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)
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
add a comment |
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
add a comment |
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
.
add a comment |
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
.
add a comment |
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
.
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
.
answered Aug 24 '11 at 1:30
Keith ThompsonKeith Thompson
194k26290484
194k26290484
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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