About 57 results
Open links in new tab
  1. shell - Difference between sh and Bash - Stack Overflow

    When writing shell programs, we often use /bin/sh and /bin/bash. I usually use bash, but I don't know what's the difference between them. What's the main difference between Bash and sh? What do we ...

  2. linux - What's a .sh file? - Stack Overflow

    5 Typically a .sh file is a shell script which you can execute in a terminal. Specifically, the script you mentioned is a bash script, which you can see if you open the file and look in the first line of the file, …

  3. linux - What exactly is the sh command? - Super User

    sh is the bourne shell. There are several shells, of which bourne is the old standard, installed on all unix systems, and generally the one you can guarantee will exist. The shell is the command interpreter …

  4. Difference between "./" and "sh" in UNIX - Stack Overflow

    Feb 28, 2014 · In simple words, sh file1 executing sh command/executable with file1 as a parameter. In this case file1 doesn't require execute privilege as sh executable read and intercept the commands in …

  5. bash - What is the purpose of the `sh` command? - Super User

    What is the purpose of the sh command when used interactively and when used inside of a bash script? Other than on the hash bang line (the first line) should sh ever be replaced with bash on a b...

  6. How can I run a shell script on a Unix console or Mac terminal?

    Nov 27, 2025 · To run a non-executable Bourne shell (executable sh) script, use: sh myscript To run a non-executable Bash script, use: bash myscript To start an executable (which is any file with …

  7. Linux跑脚本用sh和./有什么区别? - 知乎

    Mar 16, 2016 · 可以看到 sh其实就是bash,那么在这个发行版中,你如果你写的是一个shell脚本,而且脚本第一行没申明shell解释器,那么使用./a.sh和sh a.sh并没有什么区别 阅读全文 云叔 程序不能 …

  8. How to run .sh on Windows Command Prompt? - Stack Overflow

    Oct 23, 2014 · Your answer is presented as if you expect to be able to type sh on an arbitrary Windows command prompt and have it work.

  9. What does 'x' mean in this line #!/bin/sh -x? - Super User

    Apr 1, 2020 · What x mean in the shebang #!/bin/sh -x? It allows you to debug the shell script: Bash provides extensive debugging features. The most common is to start up the subshell with the -x …

  10. What is the difference between using `sh` and `source`?

    DESCRIPTION Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file. Bash also incorporates useful features from the Korn and C …