What's a script?

Derek Broughton derek at pointerstop.ca
Mon Jul 13 17:05:23 UTC 2009


Steve wrote:

> On Mon, 13 Jul 2009 15:02:52 +0100, Karl F. Larsen <klarsen1 at gmail.com>
> wrote:
> 
>> Steve Flynn wrote:
>>> On Mon, Jul 13, 2009 at 1:52 PM, Siggy Brentrup<ubuntu at psycho.i21k.de>
>>> wrote:
>>>
>>>>> What if the first line of the script is
>>>>>
>>>>> #! /bin/ksh
>>>>>
>>>>> indicating that the following commands should be interepreted by the
>>>>> Korn Shell. Should it still be referred to as a "bash file" even if
>>>>> the script relies on specific builtin commands only implemented by the
>>>>> Korn shell?

No.  It's a Korn "shell script".
>>>
>>> I cmpletely agree. I've used the term shell script since I was first
>>> introduced to a VT-52 terminal around 1981. Calling a collection of
>>> commands a "bash file" is a misnomer which is what I was attempting to
>>> point out to K. F. Larsen.
>>>
>> The term bash file comes from the similarity of it to a Windows bat
>> file. Both are executable and they do a useful thing but not a large
>> thing. I discovered the bash language to be superior to the Windows
>> version.
>>
> Bash = Bourne Again Shell
> 
> Bash is a Unix command interpreter (shell).  It is an implementation of
> the Posix 1003.2 shell standard, and resembles the Korn and System V
> shells.

In Karl's defense, I'll suggest he means the "file" part of "bash file" but 
it's irrelevant because Windows "BAT files" are still misnomers.  A file is 
just any nameable entity on a filesystem.  "Scripts" are files containing 
interpreted commands.  And a Windows .bat file is _always_ a script.  On 
*nix systems we tend to differentiate between "shell scripts" and other 
interpreted languages (e.g., python scripts), because any script can be 
executed implicitly just by modifying the shebang at the beginning of the 
file (e.g., "#! /bin/bash" or "#! /bin/python2.5")

>> Just a question. You were using a form of Unix in 1984. Linux came a
>> bit later.

That's not a question...
-- 
derek






More information about the ubuntu-users mailing list