LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-28-2015, 10:30 AM   #1
killertux
Member
 
Registered: May 2015
Location: India
Distribution: Ubuntu 14.04 LTS
Posts: 49

Rep: Reputation: Disabled
Question What is Scripting Language ?


Hello guys !
I just ran into the word scripting Language while watching a movie.Is it different than a Programming language ? If yes, then how.
And please explain their usage.
Thanks in advance......
 
Old 05-28-2015, 10:49 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,901

Rep: Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921
https://en.wikipedia.org/wiki/Scripting_language
 
1 members found this post helpful.
Old 05-28-2015, 11:10 AM   #3
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,685

Rep: Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572
The usual distinction between a scripting language and a programming language is that a scripting language does not require an explicit compilation step.
Examples in Linux would be a script written for the bash shell, that can be run directly, as compared to the Linux kernel, which is written in C, and needs to be compiled into a machine code binary.
Scripting languages are generally easier to write and test, but run more slowly as they need to be interpreted when run. A compiled binary from a programming language will run much more quickly.
This distinction gets blurred. Consider awk, which is written as a script, but is compiled to machine code before it is actually run. This explains why an awk script completes more quickly than a bash script written to perform the same task.
 
2 members found this post helpful.
Old 05-28-2015, 11:23 AM   #4
Ihatewindows522
Member
 
Registered: Oct 2014
Location: Fort Wayne
Distribution: Ubuntu 16.04 LTS
Posts: 616
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
Scripts generally don't need to be compiled, and errors stop them from running. Programs (usually written in some form of C) need to be compiled to run, and errors won't stop them from running.

Python, Bash, and JS are examples of scripting languages, Python being by far the most powerful.
C, C+, C++, C# and Java are examples of programming languages.
 
1 members found this post helpful.
Old 05-28-2015, 02:47 PM   #5
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: AntiX
Posts: 1,984

Rep: Reputation: Disabled
Writing & running a script can be very quick, whilst writing a compiled language program usually takes a lot longer & has to be compiled before being run.
(For simple jobs & one offs you would most likely write a script to do it.)
 
Old 05-28-2015, 05:26 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,899
Blog Entries: 27

Rep: Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186
Member response

Hi,

Scripting can be used to model a job to be ran then moved to a high level language once the script is proven to perform the job/task and the job can be faster with a high level language using the script as a model. Sometimes scripts will fulfill the need for a client that has set task(s) that need to be performed. Scripts can provide the quick development for a set of commands to perform the desired task(s) without the overhead of a high level language.

Sometimes quick script commands can provide the means to performance for a set of tasks that need to lead to a solution without overhead of a compiled high level language.
 
1 members found this post helpful.
Old 05-28-2015, 07:48 PM   #7
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 2,481

Rep: Reputation: 620Reputation: 620Reputation: 620Reputation: 620Reputation: 620Reputation: 620
Quote:
Originally Posted by allend View Post
... Consider awk, which is written as a script, but is compiled to machine code before it is actually run. This explains why an awk script completes more quickly than a bash script written to perform the same task.
Didn't know that, is it pure mc or just byte compiled?
 
Old 05-29-2015, 01:35 AM   #8
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Originally Posted by allend View Post
The usual distinction between a scripting language and a programming language is that a scripting language does not require an explicit compilation step.
Scripting language is a subset of programming language.
 
Old 05-29-2015, 06:48 AM   #9
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 517
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
Quote:
Originally Posted by Ihatewindows522 View Post
Scripts generally don't need to be compiled, and errors stop them from running. Programs (usually written in some form of C) need to be compiled to run, and errors won't stop them from running.
How? Errors will stop program execution, whatever the language. Depending on the kind of error, you may get either a thrown exception or segmentation fault. Believe me, errors will stop any program from running.
 
Old 05-29-2015, 07:30 AM   #10
killertux
Member
 
Registered: May 2015
Location: India
Distribution: Ubuntu 14.04 LTS
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
Thanks !
I think it's dumb of me.I should try in Wikipedia before asking next time.
 
Old 05-29-2015, 07:33 AM   #11
killertux
Member
 
Registered: May 2015
Location: India
Distribution: Ubuntu 14.04 LTS
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ihatewindows522 View Post
Scripts generally don't need to be compiled, and errors stop them from running. Programs (usually written in some form of C) need to be compiled to run, and errors won't stop them from running.

Python, Bash, and JS are examples of scripting languages, Python being by far the most powerful.
C, C+, C++, C# and Java are examples of programming languages.
Thanks !
The examples are really helpful.
 
Old 05-29-2015, 07:37 AM   #12
killertux
Member
 
Registered: May 2015
Location: India
Distribution: Ubuntu 14.04 LTS
Posts: 49

Original Poster
Rep: Reputation: Disabled
Thumbs up Problem Solved !

Thanks a lot !
I think I got the answer.And thanks again for being so much helpful.
 
Old 05-29-2015, 08:55 PM   #13
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,685

Rep: Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572
Quote:
Didn't know that, is it pure mc or just byte compiled?
Actually, according to the man page, awk compiles the script into an internal form. No more detail given.
 
Old 05-31-2015, 03:24 AM   #14
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,417

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Perl is another compiled-on-the-fly lang see http://www.perl.com/doc/FMTEYEWTK/comp-vs-interp.html (the explanation is generally applicable)
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What scripting/language to focus on? sambuca Linux - Newbie 3 04-26-2010 02:40 PM
Which is the best scripting language? kike_coello Programming 22 07-25-2009 06:16 PM
Best scripting language? walterbyrd Linux - Software 2 01-08-2006 03:13 PM
Which Scripting Language? birdseye Programming 2 10-03-2005 10:54 AM
Favorite scripting language rverlander General 8 09-02-2002 06:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration