Resolve Bash Shell pin this newspaper error ': not a valid identifier When you edit the script in the shell, the runtime appears "': not a valid identifier", or it will appear (: Command not found, many inexplicable symbols) is likely you to edit under Windows, run under Linux, Due to different text formats for Linux and Windows. The above may be one of the reactions, sometimes the terminal shows ": No files ..." is also the cause of most of this caused by the semicolon begins with ":" Workaround: Just use the UltraEdit tool to convert to Linux format, re-source run error-free The difference between Linux and Windows text:
1.Linux line break: "N"
2.windows line break: "RN" (carriage return, newline)
For example today in Rhel using Tomcat has been garbled, view i18n, found that has been modified to support GBK, should be no problem, but, has been garbled! Suddenly think of SSH login prompt ': not a valid identifier. Again with the locale to see a bit, output lang unexpectedly empty, is depressed to a script to look at when the flip. source/etc/sysconfig/i18n hint ': not a valid identifier. After the download with UltraEdit converted into UNIX file format, upload, execute source, restart Tomcat, garbled elimination!
Attached: i18n Chinese support content, provincial search everywhere, solve Chinese garbled
#以下注释为原文件内容, English.
#LANG = "en_US. UTF-8 "
#SYSFONT = "Latarcyrheb-sun16"
#以下为中文支持内容
Lang= "ZH_CN. GBK "
Language= "Zh_CN.GBK:zh_CN.GB2312:zh_CN"
Supported= "ZH_CN. GBK:zh_CN:zh:en_US. Utf-8:en_us:en "
Sysfont= "Latarcyrheb-sun16"
Lc_all= "ZH_CN. GBK "
Export Lc_all
|
BASH SHELL not a valid identifier