Batch/Shell Scripting

<still under construction>

< to add contents from here:>

Batch for Windows; Shell for Unix-based OS.

A parameter is an entity that stores values.
A variable is a parameter denoted by a name.
Parameter expansion is the procedure to get the value from the name.

Paging divides large amount of displayed text to pages using a set PAGER software, e.g. for 100 lines of code, it displays 10 lines and every next 10 lines by the end user’s keypress, another example are HTML pages

POSIX (Portable Operating System Interface) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between OSs. For example, a byte is 8 bits

Exclusive examples can be found in the Batch & Shell repositories

Shell Types

TypeWhat it Is
bashBourne Again Shell
(default Linux & Mac shell)
shBourne Shell
cshC Shell

The #! sets the shell type to use.


:: comment# comment

Shell in Windows

Command Prompt

Windows settings (Win key + i) > search Windows Features > Enable (and install) Windows Subsystem for Linux

To install distro,

Pick one from list

wsl --list --online


wsl -d --install <distroname>

In cmd: Bash <*.sh filename>


Run PowerShell as administrator

wsl --install

Windows files are located in the mnt folder that’s located in the / root.

The Ubuntu’s root is located here in Windows:


To run *.sh files, use: sh <filename>

As wsl is installed as an app, access it as how you access apps.

--- :: Skyferia Tech's Related Posts :: ---