LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-21-2002, 10:08 AM   #1
mikeshn
Member
 
Registered: Feb 2002
Posts: 586

Rep: Reputation: 30
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
 
Old 04-21-2002, 10:30 AM   #2
Config
Member
 
Registered: Jan 2001
Location: Switzerland
Distribution: Gentoo
Posts: 376

Rep: Reputation: 30
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!!
 
Old 04-21-2002, 04:20 PM   #3
sancho5
Member
 
Registered: Jul 2001
Location: Utah
Distribution: RedHat v7.3, OpenBSD 3.3, FreeBSD 5.0
Posts: 327

Rep: Reputation: 30
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)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
creating shell script that executes as root regardless of who runs the script? m3kgt Linux - General 13 06-04-2004 10:23 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration