Lesson 7 - Chapter 4: Scripting Basics Flashcards
What is a script?
a script is a small program used to automate computing actions
Where are scripts written in and executed from? (2)
- Scripts are written in a plain text-based editor like Notepad
- Executed from a command prompt
What is scripting?
powerful kind of programming that makes repetitive data manipulation and machine configuration easier
Scripts are stored as ___ files
text files
What are the 6 scripting languages?
1) .bat
2) .ps1
3) .vbs
4) .sh
5) .js
6) .py
What are 3 characteristics of a .bat file extension (scripting language)?
also known as a batch file
- Runs commands in sequence
- Displays each command as it runs using echo
- Includes remarks that explain the purpose of the file using REM
What is the .bat file extension used by?
Command Prompt (originally developed for MS-DOS)
The .ps1 file extension is used by what?
PowerShell scripts
What is PowerShell?
PowerShell is an object-oriented scripting language built into Win10/11
PowerShell includes support for what 4 things?
v, l, c, c
- variables
- looping
- cmdlets
- consistent syntax using a verb-noun command structure (Get-Help)
What are cmdlets?
small .NET-based apps
The .vbs file extension is used for? (2 names it’s known as)
- Visual Basic Script
- VBScript
What’s a warning about .bat files?
There are no restrictions on .bat files so a harmful .bat file can be run without being blocked by Windows (view the contents of the file before running it)
[.bat files can be edited using Notepad or a word processing program because they’re plain-text files]
What is VBScript? Derived from what? What editor does it use? (2)
- a Microsoft scripting language derived from Visual Basic
- uses any plain-text editor to create/edit VBScript files
The macro functions of Excel and other Office apps with macro support use what file extension instead of .vbs?
.vba (Visual Basic for Applications)
What 2 ways can you execute a VBScript file?
- wscript.exe interpreter (by default, displays output of script in a window or box)
- Windows Script Host
What file extension is used for Bash shell files?
.sh
What are Bash shell files?
a type of executable file used originally on UNIX systems, now used on Linux/macOS in Terminal mode
The .js extension is used for what?
JavaScript scripts
What is JavaScript widely used in? (6)
- Web development
- Web applications
- Web servers
- Server apps
- Smartwatch apps
- Mobile apps
What type of language is JavaScript?
It’s an object-based, interpreted language (with no connection to Java programming language)
What is the .py extension used for?
Python scripts
What is Python? What OS is it included on? (2)
- a versatile scripting and programming language
- included in macOS and most Linux distros (but available for Windows)
The Python IDLE combines what?
a text editor with a Python interpreter (but can also be executed in a browser at websites like CodeAcademy)