The difference between/bin/sh and/bin/bash

Source: Internet
Author: User
Tags posix

/bin/shwith /bin/bash the distinction, the : intercept string is not POSIX standard.

Difference
    1. shGeneral set bash of soft chains (symlink)
      [plain] view plain copy print?
      1. Ls-l/bin/sh
      2. lrwxrwxrwx 1 root root 4 Sep 04:45/bin/sh, Dash
    2. In a generic Linux system (exceptions FreeBSD , OpenBSD etc.), using sh the call execution script is equivalent to bash the open POSIX Standard mode
    3. Which means /bin/sh/bin/bash --posix

Therefore, the differences between them are from POSIX the standard mode and bash the difference, such as with the : interception of strings, not used let , the wrong interrupt, etc., in the use of the need to pay attention to.

Reference
      1. [difference between SH and bash] Http://stackoverflow.com/questions/5725296/difference-between-sh-and-bash
      2. [The difference between/bin/bash and/bin/sh] http://www.cppblog.com/erran/archive/2012/05/24/176038.aspx
      3. [#!/bin/sh and #!/bin/bash] http://fanli7.net/a/bianchengyuyan/_NET/20130916/424894.html

The difference between/bin/sh and/bin/bash

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.