Shell Scripting Languages Examples, Bash, Sh, Python, Powershell, MSDOS, PHP, Tcl, Perl

A scripting language is a programming language supports writing simply to medium level applications in operating systems like Linux, Ubuntu, Debian, CentOS, Windows, MacOS, BSD, Unix. Scripting languages can be used to run complex tasks automatically or manually with very little effort. We can describe actions in a scripting language and run them easily. In this tutorial, we will look at popular scripting languages used by different operating systems and platforms.


Bash is the king of the scripting languages. bash provides very convenient programming features. Linux, Unix and BSD platforms fully support bash. If you want to learn more about bash look following the tutorial.

Bash Tutorial

Following bash script will print Hello World to the standard output which is terminal in most cases.


echo "Hello World"


sh is the limited version of the Bash . It provides basic features for the scripting environment. We can use sh in most of the daily operating like Bash . The following example will print Hello World to the terminal.


echo "Hello World"


Python is a popular programming and scripting language used in different platforms and applications. Python can be used to develop Desktop Applications, Web Applications, Scripts, Cloud Applications etc. There are a lot of ready to use Python scripts to be used in Linux, BSD, Unix, Windows, MacOS. Python provides a full feature set of programming languages. Python has two main versions numbered as 2 and 3.

Python Tutorials

In this example we will print Hello World to the standard output.


print("Hello World")


MS-DOS is actually an operating system used 1980’s and 1990’s actively by Microsoft. But with GUI based operating system it’s used as an auxiliary tool for low-level operations like scripting and issuing commands. MS-DOS provides some programming features and structures. In this example, we will print Hello World to the MS-DOS command prompt.

> echo "Hello World"


Powershell is the next generation programming and scripting language used by Windows operating systems. It has some basic support for Linux platform too. PowerShell has bindings with programming languages like C# and Visual Basic.Net. In this example, we will print Hello World to the screen.

PS> Write-Output "Hello World"


Perl is an old friend of Unix and Linux system administrators. As it is not so much popular currently there are popular applications developed with Perl. We can print Hello World to the terminal in a Perl script like below.

print "Hello World"


PHP is a web-oriented programming language. PHP is designed as scripting language like Python. We can also use PHP as a system scripting language. We will print Hello World in this example.


echo "Hello World"

LEARN MORE  Php - Syntax Overview

2 thoughts on “Shell Scripting Languages Examples, Bash, Sh, Python, Powershell, MSDOS, PHP, Tcl, Perl”

  1. #!/usr/bin/python3

    printf(“Hello World”) #?

    its just ‘print()’ not ‘printf()’ printf is for C language.


Leave a Comment