Scripting Basics | CompTIA A+ 220-1002 | 4.8

In this video you will learn about the basics of scripting such as: scripting file types, environment variables, comment syntax, basic script constructs, & basic data types.

Script File Types

A script file is a series of commands to that are to be executed by the command-line interpreter, stored in a plain-text file in order to allow for a computer to perform a task. Scripting languages that you need to be familiar with in order to pass the A+ exam are as follows:

Basic Scripting Languages

Environmental Variables

An environmental variable is a dynamic-named value that can affect the way running processes will behave on a computer. They are part of the environment in which a process runs. For example, a running process can query the value of the TEMP environment variable to discover a suitable location to store temporary files, or the HOME or USERPROFILE variable to find the directory structure owned by the user running the process.

Comment Syntax

In computer programming, a comment is a programmer-readable explanation or annotation in the source code of a computer program. They are added with the purpose of making the source code for humans to understand, and are generally ignored by compilers and interpreters. The syntax of comments in various programming languages varies considerably. Comments are sometimes also processed in various ways to generate documentation external to the source code itself by documentation generators, or used for integration with source code management systems and other kinds of external programming tools.

Basic Script Constructs

All computer languages follow strict command structures and syntax, and while shells take away some of the burden, syntax still needs to be correct.

Variables and Loops

Basic loops enable code to run as many times as needed until a condition is no longer true. In Java, there are three types of looping: While, For, and Do…While. Other languages have similar looping logic. To read more information about looping, check out the post titled “Programming Organizational Techniques & Interpreting Logic” in IT Fundamentals FC0-U61.

Variables are used to store information to be referenced & manipulated in a computer program. They also provide a way of labeling data with a descriptive name, so our programs can be understood more clearly by the reader and ourselves. The sole purpose of variables is to label and store data in memory. This data can then be used throughout your program. To read more information about variables, check out the post titled “Data Types” in IT Fundamentals FC0-U61.

Basic Data Types

When writing scripts, coders use different data types to inform the computer about how to process different kinds of data.  The basic data types are: integers, floating point numbers, characters, & strings. To read more information about data types, check out the post titled “Data Types” in IT Fundamentals FC0-U61.