Shell Scripting
39 cards · 🇺🇸 English
Bash scripting syntax: variables, loops, conditionals, and functions.
Study all 39 cards for free
Flashcards, quizzes, pixel-art games and a daily review that remembers for you.
Try the first 10 cards
1 / 10Shell script
Tap the card for the answer · swipe right if you knew it, left if not
Already have an account? Sign in
Cards
- 1Shell scriptA computer program designed to be run by a Unix shell, a command-line interpreter
- 2Shell script dialects considered to beCommand languages
- 3Wrapper scriptA script that sets up the environment, runs a program, and does any necessary cleanup or logging
- 4ShebangA special comment starting with #! that tells the system which interpreter to use to execute the script
- 5Where must the shebang be located?It must be the first line of the file and start with #!
- 6Most common shebang for bash scripts#!/bin/bash or #!/bin/sh for POSIX-compliant shells
- 7How do comments work in shell scripts?They begin with the hash symbol (#) and continue until the end of the line
- 8What shells are guaranteed on Unix-like systems?At least one POSIX shell, typically either bash or zsh in compatibility mode
- 9POSIXPortable Operating System Interface - a standard for Unix-like operating systems
- 10BashGNU Bash (Bourne Again Shell) - the most common Unix shell for interactive use and scripting
- 11DashDebian Almquist shell - a minimal POSIX-compliant shell, often used as /bin/sh for speed
- 12ZshZ shell - a modern shell with many features, compatible with bash when run in compatibility mode
- 13Bourne shellThe original Unix shell (sh), created by Stephen Bourne, though no longer in common use
- 14KornShellA Unix shell (ksh) that improved on the Bourne shell, mostly replaced by zsh
- 15BashismsBash-specific features and extensions not found in POSIX, which may reduce compatibility with other shells
- 16Main advantage of shell scriptingCommands and syntax are exactly the same as those entered directly at the command-line
- 17Major disadvantage of shell scriptingSlow execution speed and the need to launch a new process for almost every command, plus proneness to costly typing errors
- 18What did Larry Wall say about shell portability?It's easier to port a shell than a shell script - highlighting compatibility problems between platforms
- 19Famous dangerous shell script errorrm -rf * / (with extra space) deletes everything from the root directory instead of just subdirectories
- 20'for' loopIterates over a list of items, executing commands for each item in the list
- 21'if'Provides conditional execution based on test results
- 22What file extension is common for shell scripts?.sh, though most shell scripts have no filename extension at all
- 23Ls commandLists files and directories in the current or specified directory
- 24Clear commandClears the terminal screen of all text
- 25Printf used for in shell scriptsFormatted output printing, more portable than echo across different shells
- 26SedStream editor - a Unix tool for parsing and transforming text, often used in shell scripts
- 27AwkA text processing language and tool for pattern scanning and processing, commonly used with shell scripts
- 28GrepA command-line utility for searching text using patterns (regular expressions)
- 29Pipeline in shell scriptingConnecting commands where the output of one becomes the input of another using the | operator
- 30MakeA build automation tool that replaced simple shell script compilation since the 1980s
And 9 more cards. Study the whole deck free
Articles about this deck
More Programming decks
See all- 🐳
Docker: Commands & Concepts
58 cards · 🇺🇸 English
Containers, images, Dockerfiles, and core Docker CLI commands.
- 🔁
CI/CD: Concepts & Tools
35 cards · 🇺🇸 English
Continuous integration and delivery concepts, pipelines, and common tools.
- ☸️
Kubernetes Essentials
49 cards · 🇺🇸 English
Pods, deployments, services, and core Kubernetes concepts.
- 🐧
Linux/Unix Commands
80 cards · 🇺🇸 English
Core Linux/Unix command-line tools for file, process, and system management.
- ☁️
AWS / Azure / GCP: Core Services
59 cards · 🇺🇸 English
Core compute, storage, and networking services across the major cloud providers.
- 🧱
Data Structures
95 cards · 🇺🇸 English
Arrays, linked lists, trees, graphs, hash tables and their core operations.
