What is the difference between Batch and Bash files?

前端 未结 4 1043
别跟我提以往
别跟我提以往 2021-01-30 17:20

What are the differences between Batch and Bash?

How are they being used?

4条回答
  •  青春惊慌失措
    2021-01-30 17:58

    "Batch" can mean several things (ignoring the general, non-technical definitions):

    • A file containing MS-DOS or Windows command shell instructions in the form of a script. These will have filenames ending in ".BAT" for DOS or Windows or ".CMD" for Windows.

    • Linux/Unix also has a batch command. This is used to schedule the execution of a process when the system load falls below a threshold.

    • Generically, a set of processes run as a group. This definition may be a little more tied to older systems such as those using punched cards, etc.

    From man bash:

    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 shells (ksh and csh).

    It's typically used on Linux or Unix (including OS X) systems, but it can be used on others, including Windows.

提交回复
热议问题