"/Bin/bash ^ m: Bad Interpreter: No file or directory (Bad Interpreter: no such file or directory)" appears when compiling the cocos2d-x to run the script in Linux) "This is an error.Solution:Enter sed-I's/\ r$ // 'make-all-linux-project.sh on the terminal.Here, the make-all-linux-project.sh is my file name, which can be changed to what you need.Cause:This file h
Save a script file under Windows, upload to CentOS with SSH, add permission to execute Nginx prompt without that file or directory.The shell script is placed in the/etc/init.d/directory, and then executes the/etc/init.d/nginx, prompting more of this sentence/bin/bash^m:bad interpreter.We found the information on the Internet.If the script is edited under Windows, it is possible to convert it to a DOS text format under Windows, in which case the end of
PS Background: I am in the company to do the SDK PC-side development, so often in the win under the compiler to run after running to Linux to run again has been ensured to support multi-platform.Today, after running a program under win, and then running under Linux, I used the command:[plain] view plain copy
sudo./build.sh
But nothing happens. So I changed the instructions, with[plain] view plain copy
chmod u+x build.sh
./build.sh
Error "Build.sh/bin/
Yesterday, I wrote a shell script on the WordPad in windows. When I uploaded the script to Linux using winscp, I found that the script could not run.-Bash :. /job. SH:/bin/sh ^ m: Bad Interpreter: the file or directory does not exist. The reason is as follows:
1. to convert a DOS text file to a UNIX text file, perform the following operations on Linux: # unix2dos job. Sh
2. Or VI job. Sh
Set FF = Unix
W
PS Background: I am in the company to do the SDK PC-side development, so often in the win under the compiler to run after running to Linux to run again has been ensured to support multi-platform.Today, after running a program under win, and then running under Linux, I used the command:sudo./build.shBut nothing happens. So I changed the instructions, withchmod u+x build.sh./build.shError "build.sh/bin/bash^m: Bad i
One, Linux under compile make file error "/bin/bash^m: Bad InterpreterReference article: Http://blog.csdn.net/liuqiyao_01/article/details/41542101#commentsThe results of your own tests:"1" Creates a new file using the editing tools under Windows doc2unix.sh#!/usr/bin/env bash# testpid=$ (PSgrep grep grep-grep Master | awk ' {print $} ' )echo $PIDUse cat-v under Linux to viewThe red part is the basis of the
Find a local file on the Internet, and upload it to Linux. When the local file is uploaded: "/bin/bash ^ m: Bad Interpreter: no such file or directory
After checking the hosts file, it may be that the Windows and Linux kernel formats are different.
The following command is used to encode the file.
[Root @ localhost bin] # dos2unix myshell. ShDos2unix: Converting file myshell. Sh to Unix format...
After regi
----------------Installing Vmwere Tools------------------------
BASH:./vmware-install.pl:/usr/bin/perl:bad Interpreter: No file or directory
Workaround
Yum Install Perl gcc kernel-devel
Yum Upgrade Kernel Kernel-devel
If it appears
Searching for a valid kernel header path ...
The path "is not valid.
This is because the Kernel-devel version and the corresponding kernel version is inconsistent,
Today, I wrote a script in wingide. After it is uploaded to the server for execution, the following message is displayed:
-Bash:/usr/bin/autocrorder:/usr/bin/Python ^ m: Bad Interpreter: no such file or directory
Analysis:This is caused by different system encoding formats: The. Sh. py file edited in Windows may have invisible characters, so the preceding exception information is reported when executed in L
Yum Install a package, the following error occurred;-bash:/usr/bin/yum:/usr/bin/python:bad interpreter: No file or directory
See if Yum and Python rpm are installed and the system has yum and Python rpm packages installed.Check the system command:# ls-l/usr/bin/yum #yum命令存在-rwxr-xr-x 1 root root 801 June 16:54/usr/bin/yum# ls-l Python #原因在这
Cd/usr/bin/can't find the python command
Solution:Re-make a soft
Sometimes you write scripts with errors that are listed like headings, mostly because your script files are edited under Windows. Windows, the end of each line is \n\r, and in Linux under the end of the file is \ n, then you edit the file in Windows
Shell interpreter (learning note 4) and shell interpreterI. Shell interpreter
Shell interpreter, a bridge between the user and the operating system kernel
Shell is between the operating system kernel and the user. It is responsible for receiving the operation commands (commands) entered by the user, running and interpreting the commands, passing the operations
); } else if(cc_str_is(list->head->str, "hello")) { printf("hello, i am a interpreter!\n"); } else if(cc_str_is(list->head->str, "ver")) { cc_show_version(); } else if(cc_str_is(list->head->str, "quit") || cc_str_is(list->head->str, "exit")) { exit(0); } else { printf("no such command...\n"); } cc_arg_list_free(list); return 0;}
The specific processing of different inputs has
definition: Given a language, defines a representation of his grammar, and defines an interpreter that uses the representation to interpret a sentence in a language.
Type: class behavior pattern
class Diagram:
The structure abstraction interpreter of the interpreter pattern : declares an abstract interface (or abstract class) to be implemented for all concrete
Design PHP
Interpreter mode definition(It is rarely encountered in real projects, so the theory goes first ...)
The interpreter mode is a solution for parsing according to the prescribed syntax, which is rarely used in current projects. It is defined as a representation of the method that defines a language, define an interpreter that uses this representation to
/** * Declares an abstract interpretation operation * @author stone * */public interface Interpreter {public void interpret (context context); In practice, you can have a returned type that defines the data object that is interpreted}public class Xmlsaxinterpreter implements interpreter {@Overridepublic void interpret (context context) { SYSTEM.OUT.PRINTLN ("XML SAX In
In Gof's design model: The basics of reusable object-oriented software, the interpreter pattern is said: Given a language, define a representation of its grammar, and define an interpreter that uses that representation to interpret the sentences in the language. If a particular type of problem occurs at a sufficiently high frequency, it might be worthwhile to describe each instance of the problem as a sente
PS One sentence: Eventually choose Csdn to organize the publication of the knowledge points of these years, the article parallel migration to CSDN. Because CSDN also support markdown grammar, Ah!"Craftsman Joshui Http://blog.csdn.net/yanbober" read the previous "pattern of design (behavioral) visitor pattern (Visitor pattern)" Http://blog.csdn.net/yanbober/article /details/45536787OverviewThe interpreter pattern is the behavior pattern of the class. G
Mode motiveIf a particular type of problem occurs in the system at a very high frequency, consider describing an instance of the problem as a sentence in a language, so you can build an interpreter that solves these problems by interpreting these sentences.The interpreter pattern describes how to make up a simple language interpreter, mainly used in compilers dev
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.