Script?

mikeshn

Senior member
Oct 9, 2001
367
0
0
People that use Unix/Linux use word "script". I really don't understand the difference between a script and a program.
Can someone make clear for me the diffrence between a script and a program?

Thanks in advance
 

Derango

Diamond Member
Jan 1, 2002
3,113
1
0
Generally, a script is a program that is not compiled. Rather, it is fed through an interpreter, which then executes the instructions in the script and performs the required actions.

A script, such as a shell script, is useful for performing long tasks that you have to do often. Just make a script and then run it whenever you want to perform the task. A shell script contains a list of commands to execute to perform a task.

A perl script can be like a shell script, but it can also be used on web sites for producing dynamic content, such as web forums.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
If you're DOS-oriented, a script is pretty much the same thing as a batch file. Main difference is that you can write a script for interpreters other than the command shell, the most common being perl, as mentioned above. You can check out one very powerful perl script by looking at the "adduser" command on your system.
 

BlackOmen

Senior member
Aug 23, 2001
526
0
0
You can think of a script as something that is interpreted. With a DOS batchfile, the commands are interpreted by command.com. Same goes with bash, csh, or any of the other unix shells.

A program can be anything that makes a computer do something, shell scripts included; though many consider a program to be compiled (such as c/c++).