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 ..

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..