LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Script? (https://www.linuxquestions.org/questions/linux-general-1/script-19046/)

mikeshn 04-21-2002 10:08 AM

Script?
 
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

Config 04-21-2002 10:30 AM

Well, I am a newbie too, but a program is compiled and in order to see what's happening inside it, you need the source code.
A script is (always?) a text file, that you can change easily. It is interpreted by bash (or whatever you are using). The interpretaion is slower but easier to administer. A program would need to be recompiled if changed. I hope this is correct. If not, correct me guys!!

sancho5 04-21-2002 04:20 PM

sounds pretty correct. a script contains lines of commands that can be interpreted by a shell, meaning if you took the script and fed it line by line into your shell, it would execute actual commands. "Programs" are usually called binaries and are compiled ELF or C (or something, i don't know the deeper side). You can see what that looks like by running 'cat' on a script (like /etc/rc.d/init.d/network) and running it against a binary (like /sbin/nologin)


All times are GMT -5. The time now is 02:45 PM.