This tutorial covers programming language features in

  • DOS
  • Bash
  • Shell
  • zsh

Dos has abbreviated as disk-based operation systems for Windows OS.

It has different flavors MS-DOS IBM PC DOS

The current version is DOS 9 in Windows 12 Operating System

Linux and UNIX have different scripts like bash and Shell scripts

What is sh in the terminal?

sh is a shell, command language used to execute code from a script file. It takes input from the keyboard executes script files and does output.

How do I run a .sh file in Terminal?

To execute the sh files, Please follow the below steps

  • Open terminal
  • make sure that the sh file has to execute permission to execute
  • Run script file using ./scriptfile.sh

How can I get the current date and time in the terminal

To get the current date and time in the terminal, please follow the below steps

  • Open terminal
  • Run the date command, which results in the current date and time of the day.
date

What is a terminal?

Terminal also called the command line in Most operating Systems. Terminal used to execute script files in OS.

  • Unix: Called as Shell command line
  • Windows: Command prompt
  • MacOS: Terminal Window

Latest Articles

Bash Tutorials

Explore Bash shell scripting tutorials and programming examples.

Posted January 1, 0001 by  ‐ 3 min read

Bash - Variables

Learn how to declare and use variables in bash scripts. Types of global, local, and readonly variables, and understand proper syntax for accessing variables in shell scripts.

Posted January 26, 2024 by  ‐ 5 min read

Bash - Loop File

How to loop contents of a file in Bash Shell scripting tutorials and programming examples

Posted December 31, 2023 by  ‐ 1 min read

Bash - Comments

In this tutorial, Learn the syntax and examples of inserting single and multi-line comments in shell and bash script files.

Posted January 26, 2024 by  ‐ 2 min read

Bash - Arrays

How to create indexed and associated arrays add, remove get iterate loop first and last elements of array s syntax and array cheat sheet shell examples

Posted December 31, 2023 by  ‐ 4 min read

Bash - expansion

Bash scripting tutorial on use parameter expansion in

Posted February 29, 2024 by  ‐ 1 min read

Bash - Condional Expression

Bash scripting tutorial on programming examples for concatenating string variables using simple append and shorthand arithmetic operator

Posted February 25, 2024 by  ‐ 2 min read

Bash - Case Statements

Learn Case patterns in Bash Script Programming and tutorials.

Posted January 31, 2024 by  ‐ 1 min read

Bash - Special Characters

Learn Special Characters in Bash Script Programming and tutorials.

Posted January 31, 2024 by  ‐ 3 min read

Bash - if elif else

Learn the essentials of Bash scripting with a tutorial on implementing decision-based condition execution using if, elif, and else statements.

Posted January 29, 2024 by  ‐ 3 min read

Bash - Loops

Bash scripting tutorial on supported loops with examples for, for index until, while loop

Posted January 29, 2024 by  ‐ 2 min read

Bash - Append String

Bash scripting tutorial on programming examples for concatenating string variables using simple append and shorthand arithmetic operator

Posted January 27, 2024 by  ‐ 2 min read

Bash - Functions

Bash scripting tutorial on programming examples for concatenating string variables using simple append and shorthand arithmetic operator

Posted January 27, 2024 by  ‐ 1 min read

Bash - Append String

Learn Bash scripting with practical examples of how to concatenate string variables using both simple append and shorthand arithmetic operators.

Posted January 26, 2024 by  ‐ 3 min read

Bash - Operators

Supported Operators in Bash scripting programming examples for Logical, Bitwise, Comparision arithmetic operator

Posted January 26, 2024 by  ‐ 4 min read

Bash - Numbers Comparison

Bash scripting tutorials on programming examples for if two numbers are equal or not

Posted January 26, 2024 by  ‐ 1 min read

Bash - Check Directory

Learn how to check if a directory exists, create it if not, and manage permissions in Bash scripting.

Posted December 31, 2023 by  ‐ 2 min read

Bash - File Name

Bash or shell script example for extracting file names from complete paths, obtaining filenames without extensions, and extracting file extensions.

Posted January 27, 2023 by  ‐ 3 min read

Bash - Split String

Explore Bash or shell script examples for splitting strings into multiple strings using awk and IFS.

Posted January 27, 2024 by  ‐ 2 min read

Bash - String Length

Example of Bash or shell script for finding the length of a string with practical examples.

Posted January 27, 2024 by  ‐ 2 min read

Bash - bashrc

Bash or shell script .bashrc reload and location example for Split string into multiple strings using awk and ifs examples

Posted December 31, 2023 by  ‐ 2 min read

Bash - Ternary Operator

Bash or shell script example for Ternary Operator expression with examples

Posted December 31, 2023 by  ‐ 1 min read

Bash - Lowercase

Explore multiple methods to convert a string to lowercase in Bash and shell programming with this tutorial.

Posted January 27, 2024 by  ‐ 2 min read

Bash - Uppercase

Explore multiple methods to convert a string to uppercase in Bash and shell programming with this tutorial.

Posted January 27, 2024 by  ‐ 2 min read

Bash - Substring

Bash How to check a substring exists in a string using a comparison operator and regular expression example

Posted January 26, 2024 by  ‐ 1 min read

Bash - variable set

In this tutorial, Check variable is set or unset in bash and shell script files with code examples

Posted December 31, 2023 by  ‐ 3 min read

Bash - Iterate Nos

In this tutorial, Check variable is set or unset empty or non-empty with an empty string or not in bash and shell script files

Posted December 31, 2023 by  ‐ 1 min read

Powershell - Tutorials

Powershell Terminal Tutorials with examples for beginners in Windows for automates the repeatative tasks.

Posted January 1, 0001 by  ‐ 1 min read

Powershell - Run Script from batch

How to execute powershell script from batch file in script programming.

Posted February 28, 2024 by  ‐ 1 min read

Powershell - Version

Multiple ways to know the installed powershell version using cmdlet and script programming.

Posted February 28, 2024 by  ‐ 2 min read

Powershell - Loops

Learn for, foreach, while, do while, break and continue syntax and examples Powershell scripts in Windows.

Posted January 1, 0001 by  ‐ 3 min read

Powershell - Arrays

Learn terminal command line programming scripts in DOS bash shell scripts.

Posted January 1, 0001 by  ‐ 4 min read

Powershell - Arrays

Learn terminal command line programming scripts in DOS bash shell scripts.

Posted January 1, 0001 by  ‐ 1 min read

Powershell - Datatype

Learn Powershell Datatype tutorial for beginner examples.

Posted January 1, 0001 by  ‐ 1 min read

Powershell - Date

Learn Powershell Date object get current date, format tutorial for beginner examples.

Posted January 1, 0001 by  ‐ 1 min read

Powershell - Delete

Learn Powershell Delete files and folders with commands and script examples.

Posted January 1, 0001 by  ‐ 2 min read

Powershell - Hashtables

Learn Powershell H-ashtable tutorial for beginner examples.

Posted January 1, 0001 by  ‐ 2 min read

Powershell - If else

Learn Powershell If else conditional statement tutorials for beginner examples.

Posted January 1, 0001 by  ‐ 2 min read

Powershell - Operators

Learn terminal operators logical, comparision, bitwise command line programming scripts in DOS bash shell scripts.

Posted January 1, 0001 by  ‐ 1 min read

Powershell - string

Learn Powershell string methods tutorial for beginner examples.

Posted January 1, 0001 by  ‐ 2 min read

Powershell - Switch

Learn Powershell Switch conditional statement using string, one line simple logical and or operator tutorial for beginner examples.

Posted January 1, 0001 by  ‐ 2 min read

Powershell - Variables

How to declare and use variables in Windows with examples environment variables in windows scripts.

Posted January 1, 0001 by  ‐ 3 min read

DOS

MSDOS basics and programming language tutorials

Posted January 1, 0001 by  ‐ 4 min read

DoS - Logical

How to use logical operators and or in DOs batch programming example.

Posted January 1, 0001 by  ‐ 1 min read

DoS - Pass Arguments

How to pass arguments to batch file & example.

Posted January 1, 0001 by  ‐ 2 min read

DoS - Pause

How to do pause with enter key Batch file DOs batch programming example.

Posted January 1, 0001 by  ‐ 1 min read

DoS - Comments

Step-by-step tutorial on How to add a comment in a cmd dos batch programming in dos batch programming.

Posted January 1, 0001 by  ‐ 1 min read

DoS - Variables

how to define local global variables environment variables and reference prompt to read and store numeric values with examples setx, set command in dos batch .

Posted January 1, 0001 by  ‐ 3 min read

DoS - IF block

Learn if blocks if else statements and nested if else examples in dos batch programming. Check variable is defined or not

Posted January 1, 0001 by  ‐ 2 min read

DoS - For Loop

Iteration in DOS using for loop An example to iterate files in a directory in DOS batch programming.

Posted January 1, 0001 by  ‐ 1 min read

DoS - Check file exists

How to Check file or directory exists in batch programming in windows scripts example program.

Posted January 1, 0001 by  ‐ 2 min read

DoS - Check Substring exists

How to Check file or directory exists in batch programming in windows scripts example program.

Posted January 1, 0001 by  ‐ 1 min read

DoS - Create empty file

How to create an empty file with the command line in Windows for example.

Posted January 1, 0001 by  ‐ 1 min read

DoS - Error Level

Learn errorlevel variable in batch processing in Windows example.

Posted January 1, 0001 by  ‐ 2 min read

DoS - List files in a directory

Learn List file names in a directory of windows batch scripts example program using command line and script with for loop for a given folder

Posted January 1, 0001 by  ‐ 2 min read

DoS - String

Learn String operations and exampes command line scripting in Windows".

Posted January 1, 0001 by  ‐ 1 min read

DoS - Variable Substitution

Learn Variable Substitution batch programming in windows scripts example program.

Posted January 1, 0001 by  ‐ 2 min read

DoS - Escape Character

How to escape character as literal string in command line or batch fil programming.

Posted January 1, 0001 by  ‐ 3 min read

DoS - New Line

How to echo new line break or blank line and write to file in DOS programming.

Posted January 1, 0001 by  ‐ 1 min read

DoS - Remove file and FOlder

How to remove file and folder using command line and batch scripting programming, and also check if file or folder exists using file.

Posted January 1, 0001 by  ‐ 2 min read

DoS - Batch Operators

How to run multiple .bat files in sequential and parallel order in DOS programming.

Posted January 1, 0001 by  ‐ 2 min read

DoS - Increment Variable

How to increment variable or counter in .bat files in For loop incremental variable in DOS programming.

Posted January 1, 0001 by  ‐ 1 min read

DoS - Launch and Exit

How to Launch and Exit a program in batch files terminate the program in DOS programming.

Posted January 1, 0001 by  ‐ 2 min read

DoS - Run Multiple Files

How to run multiple .bat files in sequential and parallel order in DOS programming.

Posted January 1, 0001 by  ‐ 2 min read

DoS - Current Directory

How to use the current directory in batch code. append the filename to the current directory Run another bat or exec file from the current working directory.

Posted January 1, 0001 by  ‐ 2 min read

DoS - Directory List

How to list directories and subdirectories in a folder command line in Windows with example.

Posted January 1, 0001 by  ‐ 2 min read

DoS - Multiple Commands

How to Run multiple commands in a single line using cmd in Windows

Posted January 1, 0001 by  ‐ 2 min read

DoS - Shutdown

How to shutdown restart logoff stop a window machine using the batch program shutdown command in Windows to reboot and hibernate forcibly

Posted January 1, 0001 by  ‐ 2 min read

DoS - Tree Command

How to display a tree view of files and folders in Windows And DOS command tree with f and a options

Posted January 1, 0001 by  ‐ 2 min read