Read about sh line 0 syntax error near unexpected token, The latest news, videos, and discussion topics about sh line 0 syntax error near unexpected token from alibabacloud.com
The latest cocos2d-x version is 2.1.3, Which is okay when build_native.sh is called, but the following error occurs when build_native.sh clean.
Clean: chipmunk_static [armeabi]/bin/sh:-C: line 0: syntax error
Sometimes some of the improperly processed SH script files in Windows are placed under Linux to perform an error, prompting for a newline character, mainly because the end of the EOL line under window is "\ r \ n" two characters, while Linux,unix is "\ n".The following VIM commands are confirmed.: E ++ff=unix% #显示回车符 (\ r), specific in the VIM environment will be
It was a simple thing to turn around because the typewriter was more interesting ...
Http://blog.csdn.net/xyp84/archive/2009/08/11/4435899.aspx
Summary:
Enter
Line Wrap
0D
0A
Carriage return
Line Feed
"/R"
"/n"
Win32
0D
0D 0A
Unix
0D
0A
============ the ===
The most likely cause of this problem is:Files written under Windows are uploaded to Linux execution.I wrote the code on notepad++, and then uploaded it to Linux to execute it and report this error. Careful examination, there is no grammatical error. Surfing the Internet, found that Windows and Linux are different lines of the cause of the change.Windows is carriage return +
After you write a Linux shell script under Windows with Notepad, execute the syntax error near unexpected token errorsProblem principle:Online search for a long time, find the reason, the original is the problem of return, each system of the return
The latest when looking at a shell data, according to the textbook, but the following error, can not runAs follows, the simple script:#!/bin/bashcat | while Read Line do Echo $line Done awk'{print $}')The following error occurred while runningsh while_test. SH while_tes
It was a very simple thing, but it turned out that the typewriter was quite interesting ......
Http://blog.csdn.net/xyp84/archive/2009/08/11/4435899.aspx
Summary:
Enter
Line feed
0d
0a
Carriage Return
Line feed
"/R"
"/N"
Win32
0d
0d 0a
UNIX
0d
0a
============== Quiet split
From: http://blog.csdn.net/xyp84/article/details/4435899
Today, I wrote a shell script, which runs normally on my machine. To my colleagues, run the syntax error near unexpected token error. I can check the shell script on the lef
Today, I wrote a shell script, which runs normally on my machine. To my colleagues, run the syntax error near unexpected token error. I can check the shell script on the left and right, but there is no way to search by Google, I f
Problem description
Execute run.sh script is an error, the error message is as follows:
/data/app/information-provider
: No such file or directory
: command not found
./run.sh:line 4:syntax Error Near unexpected
Today wrote a shell script, the old error check the basic syntax and did not find errors. Later after the settlement of Baidu, and now summarized as follows.error phenomenon : Execute shell script, old error "syntax error near
Linux syntax error near unexpected token ... There are two common causes of error:1) The inconsistency of line breaks between Windows and Linux causesThe newline under window is differe
Several simple shell programs were written these days, and then all appeared syntax error near unexpected token ' ('Error, and then it is not possible to check the error, the reason beh
Before I did not know what to configure in the Git bash page, the following error is done in the Times:$ GIT fetch origin\ "D:/program Files (x86)/gitextensions/gitcredentialwinstore/git-credential-winsTore.exe\ "Get:-c:line 0:syntax error near
If you write a shell script in Windows to run on a Linux system, you will be prompted with the following error syntax errors near unexpected token ' ... This is due to the fact that the following line breaks are not the same for t
This happens because the file line break you are working with is "\ r \ n" in DOS format.You can use the Cat-v file name to see if the newline character is, and if it is, the end of the line will be ^m"\ n" needs to be converted into Linux/unix formatThe specific conversion method is to convert the newline character.You can use the SED command to process a file with the following command:Sed ' s/\r//' origi
Execute a Script Discovery report syntax error, but running on other machines is no problem the only difference is that a CentOS machine error is UbuntuSearch the Internet for a momentBecause the default SH is connected to dash, and because the dash is not compatible with bash, it goes wrong. You can change
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.