Find the answer to your Linux question:
Results 1 to 8 of 8
Can anybody please tell me why Unix Shell programming is called shell Scripting? Thanks in advance....
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    5

    why its called Scripting

    Can anybody please tell me why Unix Shell programming is called shell Scripting?

    Thanks in advance.

  2. #2
    Just Joined!
    Join Date
    Feb 2009
    Posts
    12
    I've always thought that it was because the shell/interpreter reads the file as a script of what to do. The actors (commands) read the script to find out their lines (parameters), and then execute them, in order (unless you're using some play that Vonnegut wrote, in which case I guess you'd be scripting in perl).

    Of course, I could be way off base. Just how I've always thought of it.

  3. #3
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    That's very eloquently put, emsenn .

  4. #4
    Just Joined!
    Join Date
    Jan 2009
    Posts
    5
    Thanks for your answer emsenn, its good.
    But still i'm in confusion.
    I need diference between and programing and scripting.

  5. #5
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    The line is very blurred.
    Personally, I use the term "scripting" if each instructions for itself does a sophisticated task, for example one line calls a standalone program. Programming consists more of dealing with more atomic operations (e.g. adding two integers).
    I think the amount of operators can be a pretty good decider.

    Then there is a difference between interpreting vs. compiling, interactive vs. non-interactive and the somewhat formal question of Turing completeness.

    It's hard to give a strict differentiator.
    To employ emsenn's actor analogy, it may be the difference of telling someone "go to this room" (which implies moving his feet and opening the door) and saying "now lift your right leg by 5inch")
    Debian GNU/Linux -- You know you want it.

  6. #6
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    Let me add my own completely baseless story that I've always held to .

    I've always thought of it with shell scripting being the original "scripting". This is because a shell script doesn't actually do anything on its own, but rather calls out to other, prewritten programs to do its work for it.

    Because shell scripts are interpreted, not compiled, the term "scripting" came to be connected to interpreted languages. For instance, Perl and Ruby are occassionally referred to as scripting languages.

    In reality, there isn't a difference between a "programming language" and a "scripting language". There is no known distinction between the two terms. Ruby is a "scripting language" in the sense that it's interpreted, but it is a "programming language" in that it does all of its own work.

    I cannot imagine a real world situation where understanding the difference would matter, so I wouldn't worry too much about this.
    DISTRO=Arch
    Registered Linux User #388732

  7. #7
    Just Joined!
    Join Date
    Jan 2009
    Location
    india
    Posts
    6

    hi

    its very simple ya.....

    for programming v ll do linking,compilation, etc....

    but for scripting there is no word for compilation. it ll just calling or called by another program..

    unix shell scripting is also more or less the same

    i think i am correct

  8. #8
    Just Joined!
    Join Date
    Feb 2009
    Posts
    12
    There isn't really a line. What one person might call scripting, another might call programming. (I'm looking at you, blackhat script kiddies.)

    That said, the line is commonly drawn on whether or not the code uses its own functions, or simply the already existing functions. I can't think of a good way to carry over the actor analogy, so I'll simply do a checklist of how to see if something is a script or program

    SCRIPT
    • Written in an interpretted language
    • Written in a high level (python, php, java) language
    • Written fairly simply, relies a lot on external functions
    • Written for a very specific task, such as connecting to a certain wireless network on this one computer

    COMPILED
    • Written in a compiled language
    • Written in a low level language
    • Complex - frequently uses lots of conditional statements
    • Uses lots of local functions
    • Typically isn't written for just one computer.


    Of course, there are lots of things that do something from each category - for example Wordpress uses a high level interpretted language, but is very complex. Other things, like some C programs, are very simple and intended to just act as a portable way to get a job done.

    In these cases, its more about the purpose its put to use for.

    Oh - and if you ever want to debase someone's program, just call it a script. Works every time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...