语言处理器编译器(compiler):阅读以某一种语言(源语言)编写的程序,并把该程序翻译成为一个等价的、用另一种语言(目标语言)编写的程序。编译器的重要任务之一是报告它在翻译过程中发现的源程序中的错误。解释器(interpreter):另一种常见的语言处理器。它并不通过翻译的方式生成目标程序。从用户的角度看,解释器直接利用用户提供的输入执行源程序中指定的操作。在把用户输入映射成输出的过程中,由一个...
分类:
其他好文 时间:
2015-02-22 17:24:16
阅读次数:
308
A shell script is a text file that typically begins with a shebang, as follows: #!/bin/bash /bin/bash is the interpreter command path for Bash. $ sh /...
分类:
系统相关 时间:
2015-02-14 12:16:24
阅读次数:
208
今天测试shell脚本时,执行报错:./report.sh: /tmp/tmp.E8ekx6r5Qq/report.sh: /bin/bash^M: bad interpreter: No such file or directory找半天原因,结果发现是Windows和Unix下的编码问题,不兼容...
出现这种情况,通常都是在window下写好的shell脚本,拷贝到linux机器执行 才会出现原因就是:windows下每一行的结尾是\n\r,而在linux下文件的结尾是\n这样window写编辑的shell脚本拷贝到linux下时每一行的结尾就会多出来一个字符\r这个\r字符会被显示为^M所以就...
分类:
系统相关 时间:
2015-02-06 14:42:35
阅读次数:
226
在执行shell脚本时提示这样的错误主要是由于shell脚本文件是dos格式,即每一行结尾以\r\n来标识,而unix格式的文件行尾则以\n来标识。
查看脚本文件是dos格式还是unix格式的几种办法。
(1)cat -A filename 从显示结果可以判断,dos格式的文件行尾为^M$,unix格式的文件行尾为$。
(2)od -t x1 filename 如果看到输出内容中存在0...
分类:
其他好文 时间:
2015-02-04 11:10:05
阅读次数:
134
Implementing a language in this way (or as a Java interpreter class for the scripting language) provides all the advantages of the Java platform: scripting implementations can take advantage of the Java platform's binary portability, security, and high per...
分类:
编程语言 时间:
2015-02-04 09:27:51
阅读次数:
235
http://www.cnblogs.com/maowang1991/archive/2013/04/15/3023236.html解释器模式是我们暂时的最后一讲,一般主要应用在OOP开发中的编译器的开发中,所以适用面比较窄。Context类是一个上下文环境类,Plus和Minus分别是用来计算的实...
分类:
其他好文 时间:
2015-02-03 16:50:43
阅读次数:
137
static int __init acpi_init(void)
{
int result;
if (acpi_disabled) {
printk(KERN_INFO PREFIX "Interpreter disabled.\n");
return -ENODEV;
}
acpi_kobj = kobjec...
分类:
其他好文 时间:
2015-01-27 23:35:26
阅读次数:
332
static int __init acpi_init(void)
{
int result;
if (acpi_disabled) {
printk(KERN_INFO PREFIX "Interpreter disabled.\n");
return -ENODEV;
}
acpi_kobj = kobjec...
分类:
其他好文 时间:
2015-01-27 23:30:18
阅读次数:
333
OracleLinuxServer7安装VMwareTools问题#./vmware-install.pl时报错:#-bash: ./vmware-instal.pl:/usr/bin/perl:bad interpreter:No such file or directory原因:未安装perl环...
分类:
数据库 时间:
2015-01-27 14:48:45
阅读次数:
267