good day! Tell me, what is the difference between .bat files and .sh in OS Vent 7

  • one
    The fact that .sh generally has nothing to do with windows and its command lines? - etki
  • @Fike well, this is too bold a statement. There are a lot of ports of any unixoid shells on Windows. It seems there is even from MS - alexlz
  • sh in "windows" will be only if you explicitly set cygwin or analogs. - KoVadim
  • @KoVadim has a lot of native ports too. msys, zsh-nt.sourceforge.net , etc. - alexlz
  • @alexlz and I do not agree with that? I clearly indicated the word "analogues". - KoVadim

1 answer 1

The extension ".bat" is called package files that contain a set of commands for execution by the interpreter "cmd.exe".

The extension ".sh" is called shell shell files.

Despite the fact that " .bat" and " .sh" are much more often used in Windows and Linux, respectively, they can be successfully executed in both OS families using various third-party utilities.

That is, by launching the "* .bat" file in OS Widnows Se7en, we thereby initiate the start of the "cmd.exe" interpreter and step-by-step execution of commands embedded in the transmitted batch file.

Having installed support for Bourne-scripts on Windows Se7en, for example using Cygwin tools, you can send "* .sh" files for execution using the corresponding interpreter.

  • one
    Bourne has nothing to do with it. Bourne Again Shell is just one of the variations of the native unix shell. I would prefer a wording such as:> The extension ".sh" is usually called Shell shell script files like them - Barmaley
  • 2
    Bourne is like the ancestor of all and all variations of realizations, if I am not mistaken. In any case, it would be better to use your definition in the answer. Thank. - uzumaxy
  • one
    Bourne seems to be wider than the native shell and has become popular thanks to Linux and MacOS, in some Unixes I don’t even have it (I can be wrong). For example, IBM AIX defaults to using Korn Shell - Barmaley
  • @Barmaley to me deeply on ***** on IBM AIX and others like them - voipp
  • @voipp your opinion in general is of little interest. There was a discussion between two educated husbands about the background story :) - Barmaley