Jump to content

Recommended Posts

Posted

Hey to all the computers lovers!!

 

After busy weeks with a lot of paperwork and study,i decided to write about Scripting Programming Languages.I had an experience lately,that pushed me to inform some people about the use of them and the benefits of learning one.

 

First of all,lets start with defining what is a Scripting lang.A quick search in wikipedia,we come to this :”A scripting language or script language is a programming language that supports the writing of scripts, programs written for a software environment that automate the execution of tasks which could alternatively be executed one-by-one by a human operator. Environments that can be automated through scripting include software applications, web pages within a web browser, the shells of operating systems, and several general purpose and domain-specific languages such as those for embedded systems.”

 

You probably think that it is hard to write code in S.L. And yet you are wrong.They are famous  due to the fact that they have loose structure and simple syntax,enabling even the rookies to learn them and use them.From time to time,they have risen so much that  eliminated in speed and code reliability  others features of hard-coded programming language like C and  java.

 

But enough with words..Lets see an easy example in Perl to prove my arguments :

 

You are trying to install an .sh file in linux and you are bored of the procedure .What we gonna do,is write a script which would take every tar file we have and execute the necessary commands in order to be installed.

 

#!/usr/bin/perl -w

print "Welcome to .sh installer \n";
print "Give the .sh full name(with the .sh extension) : \n";
chomp ($shname =<STDIN>);

print "Now installing.... $shname \n";
system ("chmod +x $shname");
system ("sh $shname");
system ("./ $shname");

 

This is pure linux power – the reason why linux makes programmers ..

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...