Blog Page

An introduction about Shell Scripting ?

Introduction about shell-scripting

Shell Scripting

Shell Scripting is an Open-Source Operating System.

What is Shell Scripting?

In Linux, shells like bash and korn support programming construct which are saved as scripts.These scripts become shell commands and hence many Linux commands are a script. A System Administrator should have a little knowledge about scripting to understand how their servers and applications are started, upgraded, maintained or removed and to understand how a user environment is built.

How to determine shell

You can get the name of your shell prompt, with the following command:

Syntax:

  1. Echo $SHELL

The $ sign stands for a shell variable, echo will return the text whatever you typed in.

Shell Scripting She – bang

The sign #! Is called she-bang and is written at top of the script. It passes instruction to program /bin/sh.

To run your script in a certain shell (shell should be supported by your system), start your script with #! Followed by the shell name.

Shell Scripting Comments

Any line starting with a hash (#) becomes a comment. The comment means, that line will not take part in script execution.

Shell Scripting Variables

Scripts can contain variables inside the script.

As scripts run in their own shell, hence variables do not survive the end of the script.

Shell Scripting Sourcing a file

A file is sourced in two ways. One is either writing as source <fileName> or other is writing as. ./<fileName> in the command line. When a file is sourced, the code lines are executed as if they were printed on the command line.

The difference between sourcing and executing a script is that, while executing a script it runs in a new shell whereas while sourcing a script, a file will be read and executed script run in the same shell.

In sourcing, script content is displayed in the same shell but while executing script run in a different shell.

Troubleshooting a shell script

There is one more way other than script execution to run a script in a different shell. Type bash with the name of the script as a parameter.

Syntax : bash <fileName>

Shell Scripting Prevent Setuid root spoofing

Spoofing is a technique through which a user tries to grant unauthorized access on a system be pretending to be the root user. This is called setuid root spoofing. To prevent from spoofing and you can add —  then after #!/bin/bash. It is disabled further option processing so that shell will not accept any options.  

 

 

 

16 thoughts on “An introduction about Shell Scripting ?”

  1. El Priligy viagra prescription Marchio Propecia Amoxicillin Warfarin Interaction viagra Viagra Online Bestellen Gunstig Magic Pharmacy Online Usa 67 cialis Acheter Cialis Site Serieux Levitra Necessita Di Ricetta Medica Cialis Real Viagra Without A Script Buy Generic Effexor Online Viagra Sample Quanto Costa Il Cialis In Slovenia Compra Cialis In Contrassegno Buy Cheap Levitra Sildenafil Viagra Pdf Discount Worldwide Online Progesterone 100mg Menopause Secure Ordering Cialis Order Alldaychemist Com Cialis Daily Use Buy Online 248 Buy Viagra Brand Name Propecia Generic Priligy Price Uk Buy Cheap Cialis Pills Cialis Temoignages Cialys Online No Prescription Order Cialis Online Canadian Rx Network Bystolic Canadan Provider Viagra Price Buy Generic Viagra 50mg Buy Cheap Celexa Kamagra Online Buy Buy Kamagra India Cialis Rezeptfrei Schneller Versand Inland Generic Viagra Online Avoid Taking Vitamin With Amoxicillin Amoxil 49 Ml Water Viagra Alternative Amoxicillin Viral Reaction Comparatif Prix Cialis Viagra Buy Levitra Vardenafil Efficienza Propecia Legally Macrobid 100mg On Sale Low Price Pharmacy viagra cialis Vendita Levitra Bayer Cialis E Glaucoma Cost Of Kamagra Cialis Indian Pharmacy My Canadian Pharcharmy Online Purchase Generic Cialis Donde Comprar Viagra Por Internet How To Find Orlistat 120 Mg 93551 Zip Buy Decutan Order Tab Acticin Permetrina Overseas Levitra Viagra Cialis Brand Cialis Online Viagra Medicament Isotretinoin Izotek From Canada Direct Low Price Overseas Cheap Cheap Viagra Sale Isotretinoin Can You Buy Viagra Online Levitra Online Forum Estrofem For Sale Riding Ajax Shadow cabinet role Agriculture and AgriFood Naked Yoga Calgary Offers Valentines Day Class For Couples Riding Halifax Atlantic Ontarios Electric Car Subsidy Will Put Up To In Buyers Pockets Wedding Style Canada CA Canada Politics Get it at Blackberry App World Thalassa advertise Get top stories and blog posts emailed to me each day. These monthly payments are then Disbursed to your Payday Loan companies on a monthly basis so you dont have to continue to give. loans with bad credit You can contact us to find out more about the ways in which you can make an early payment and to find out how much money you will save on interest if you pay the money back early. Use your monthly turnover to get instant hour loans for equipment leasing payroll real estate finances commercial business loans.Louer Levitra Pas Cher Generic Kamagra Cheap Dosis Levitra Vipps Canadian Pharmacy Reviews cialis Viagra En Ligne Danger Cialis Necesita Receta En Espana Buy Cialis Online Cheap Ou Acheter Cialis Sans Ordonnance Private Prescription For Ciprofoxacin Viagra 100mg Tomar Viagra O Levitra Propecia Forehead Since Cheap Propecia Online Uk Real Hydrochlorothiazide Internet Overseas Amex Accepted Dutasteride 0.5mg Avidart Sale viagra Viagra 100mg Buy Dental Abcess And Amoxicillin Online Pharmacy Kamagra Penacillin Allergy Cephalexin Is Priligy Any Good Buy Priligy Cheap Acquistare Cialis Kamagra In Linea Cephalexin Hazard Danger Sildenafil Dosage Amoxil Reaction Allergique Viagra 25 Effetti Generic Viagra Cheap Cialis Marseille Kenalog Buy Generic Cialis Uti Antibiotics For Sale Photos De Pilules Amoxil Propecia Finasteride Kamagra Getafe Does Amoxicillin Cure Chlamydia Oratane Propecia Precio Laboratorio Vardenafil Without Prescription Cheap Viagra On Line Effexor Xr Without Rx Rx Drug Sotre Purchase Levitra Levitra 10 Mg Usato Viagra On Line Purchases Cialis Buy Online Levitra Cost Uk Zithromax 1 Gram Oral Packet Generic Sildenafil Kamagra 100 Mgs Kamagra Interactions Levitra Buy Online Cialis Originale 5 Mg Fluoxetine 40mg Over Night cialis Podofilox Who Ships Frusemide Express Delivery? Generic Cialis Usa Keflex Urinary Tract Infections Bacteria Resistance

Leave a Reply

Your email address will not be published. Required fields are marked *