Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^2: At Last, a Useful Definition of "Scripting Language"

by hardburn (Abbot)
on Oct 29, 2004 at 13:20 UTC ( #403736=note: print w/replies, xml ) Need Help??

in reply to Re: At Last, a Useful Definition of "Scripting Language"
in thread At Last, a Useful Definition of "Scripting Language"

If C is your "get stuff done" language, why not say it's your scripting language?

Does a shell script have to have a #! line at the start, or is this just a nice-to-have to make sure the right shell executes it?

The shebang is there so you can say:

$ ./

Instead of:

$ bash

The shebang also makes it possible for other programs to execute the script without knowing what language the program is written in. For instance, Apache/mod_cgi just needs to fork() and exec() on anything specified as a CGI. No need to check the file extention or somesuch to line it up with a specific interpreter.

It is perfectly possible to leave the shebang out. You just have know what interpreter to use.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Replies are listed 'Best First'.
Re^3: At Last, a Useful Definition of "Scripting Language"
by PhilHibbs (Hermit) on Jan 26, 2005 at 11:50 UTC
    C is a generic programming language, with features deliberately left out because they can't be provided on all platforms (e.g. graphics). To me, a scripting language is an embedded language that controls the operation of that which it is embedded into. Hence, shell script is a language embedded into the shell. JavaScript is a language built into web browsers and web servers to provide programmatic access to their features.

    Perl is somewhat unusual, as it can be embedded into other applicatons, is designed to replace the existing scripting language that the shells provide, and also is a stand-alone language with wider capabilities.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://403736]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (9)
As of 2023-12-11 12:49 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (41 votes). Check out past polls.