I learned shell programming for the first time.ArticleShellProgramIt must start "#! /Bin/sh.
Although I know that all statements starting with "#" in shell are comments, I never think "#! /Bin/sh is also a comment, just as there is no doubt that a C program must have a main function.
But some time ago I heard that "#! /Bin/sh "is also a comment and dispensabl
Linux executes. sh file, prompting no such file or directory problem Resolution12-06-28 16:59love__coderLinux executes the. sh file, prompting no such file or directory issuesProblem descriptionWorkaroundAnalyze the cause, maybe because I have a permissions issue with the platform migration, we're going to switch permissions.1) Convert under Windows:Use some editors, such as UltraEdit or EditPlus, to first
Tags: impact situation research and development indicates BSP file rect linux dirThere is often a sentence at the beginning of a shell script to define what kind of SH interpreter to use to interpret the script.There are two main types of shell scripts that are currently developed for testing:(1) #!/bin/sh(2) #!/bin/bashWhat is the difference between the two ways? What are the different effects of the actua
Modify catalina in windows. sh upload to linux run error This file is needed to run this program solve 1. Found the problem due to tomcat memory overflow, modified catalina in windows. sh, then upload it to the linux server through ssh, and run catalina. sh: Cannot find. /catalina. sh This file is needed to run this pr
First, meaning#!/bin/sh means that this script uses /bin/sh to interpret execution,#! is a special designator, which is followed by the path to the shell that interprets this script.In fact, the first sentence of #! is the script interpreter program path, the content of the script is interpreted by the interpreter, we can use a variety of interpreters to write the corresponding script.such as /bin/csh scrip
Resin-startup script httpd. sh AnalysisAfter analyzing the tomcat startup scripts, we found that catalina. THE sh script has a problem in stopping, but the author has never found that the service cannot be stopped when using resin in the production environment, so let's analyze the resin STARTUP script httpd first. sh.
#! /Bin/
There are two cases of executing. sh files under Linux:First, direct./plus file name. SH, if running hello.sh for./hello.sh "hello.sh must have x permission"Second, direct sh plus filename. sh, such as Run hello.sh for SH hello.sh "hello.sh can have no x permission"To illust
For more information about Linux general technology-Linux technology and application, it is best for root users to use sh. Original write: linuwa
In many systems, the default shell is sh, especially for root users. Why not use more comfortable bash or other shells?
You can think of it only for safety, but what is the reason?
Let's play.
A basic principle is that the system must be able to run th
In Linux, how does one change the database script file from the sh format to the SQL format,
In the process of software development, it often involves changing the database script file from sh format to SQL format in Linux. This document uses an actual script file as an example to describe the format conversion process.
1. sh File Content
The file name in this ar
Today, I wrote a shell script and reported an error during execution. the script content is simple and only for testing: Shell Code :#! /Bin/shecho quot; testshell quot; the specific error message is as follows: Shell code: [root @ localhosttest] #. /test. sh-bash :. /test. sh:/bin/sh ^ M: bad... today, I wrote a shell script and reported an error during execut
Write down the Simple Method for installing *. sh and *. bin In Ubuntu. *. Sh File Installation Method: run the terminal to the file directory 1. enter sudosh * on the terminal *. sh directly run 2. enter sudochmod + x * on the terminal *. sh and enter sudo. /*. sh can be in
First, direct./plus file name. SH, if running hello.sh for./hello.sh "hello.sh must have x permission"Second, direct sh plus filename. sh, such as Run hello.sh for SH hello.sh "hello.sh can have no x permission"1 , CD to. sh files in the same directory cd/home/test/shell/2 ,
Always thought that in the shell script # is to represent the annotation function, also at the beginning of the script #!/bin/sh also just tell the user this is a shell script, and recently checked the next, only to find that this is not the meaning, share the following article.Transferred from: http://www.cnblogs.com/EasonJim/p/6850319.htmlFirst, meaning#!/bin/sh means that this script uses /bin/
Because today wrote a small script, dead or alive unsuccessful, always reported file or directory does not exist, asked our horse classmate's normal wording, found only the difference between the script head, that is, today this article to talk about the #!/bin/sh and #!/bin/bash.
This article references: https://www.cnblogs.com/aaronLinux/p/6885288.html and http://www.cnblogs.com/baizhantang/archive/2012/09/11/2680453.htmlOne: Explanation#!/bin/
How to execute. sh files under LinuxThe. sh file is a text file, and if you want to do this, you need to use chmod a+x xxx.sh to give executable permissions.Is it a bash script?You can use Touch test.sh #创建test. sh fileVI test.sh #编辑test. sh fileJoin content#! /bin/bashmkdir testSave exit.chmod a+x test.sh #给test.
An error occurred while executing the script in Ubuntu system "Source command not found in sh shell"This is actually a script that executes in Ubuntu by default with dash, not bashby command#LS -l 'whichsh/bin/sh --dashWe found that the SH used by default in the script actually corresponds to dash, not bash. In order to resolve this error, we need to modify the c
I often in Linux by compiling the. sh file to build the project, has been no problem, the code has not changed, but the compilation today, but the error is prompt:Then I was very puzzled to see my. sh file, which has a lot of [], are these errors, but has been no problem.Later found, because Ubuntu default sh is connected to dash, but also because of the dash and
Unless you have recently installed third-party software that is of interest to developers, you are likely to be advised to install it directly from the network using the following command.?
1
curl-shttp://example.com/install.sh|sh
This article is not intended to discuss the good or bad of this approach, but to remind those who use this method, which, in addition to the obvious drawbacks, has another downside: to directl
In ubuntu,/bin/sh points to/bin/sh in ubuntu. by default, it is dash. using ll/bin/sh, we can see that sh is a link to dash, sometimes it may cause problems when using bash scripts. If this problem occurs, point sh to bash. Ln: ln-s/bi...
In ubuntu,/bin/
I had a problem learning Linux today.
#!/bin/sh
# test.sh
username= ' HCBBT '
echo ' My name is ${username}. Call me ${username:0:1}-chan. "
This script runs directly to the Times wrong:/test.sh:5:./test.sh:bad substitution.Toss, found that the first line of the interpreter changed to/bin/bash is no problem.
So I checked the difference between/bin/sh and/bin/bash, using: Intercept the string is not POSI
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.