IT Fundamentals: Bash Shell

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

Bash Shell

An interactive shell that lets users type commands to directly interact with the operating system, and a scripting language (allows users to write sequences of commands that automate tasks)

2
New cards

history

Each time you enter a command, it is recorded in a history list (so you can easily recall a previously entered command → if you want to see, then type the command

3
New cards

Wild Cards / Filename Expansion

Special characters that let you match multiple filenames or paths using patterns instead of typing each name explicitly. Bash automatically expands these patterns into the matching filenames before the command runs.

  • For instance, ls *.txt would list all files that end with the .txt extension, no matter what their name was.

<p>Special characters that let you match multiple filenames or paths using patterns instead of typing each name explicitly. Bash automatically expands these patterns into the matching filenames before the command runs.</p><ul><li><p><span><strong><span>For instance, ls *.txt would list all files that end with the .txt extension, no matter what their name was.</span></strong></span></p></li></ul><p></p>
4
New cards

Variable

A name given to a storage location that is available in a Bash shell. By using this, you can reference that variable from various commands rather than having to use the value directly.

User variables: Defined by the user and often only used in command-line operations


Environment variables: Established either by the OS, the Bash interpreter, or by some other running software; Bash usually defines its own environmental variables

  • Examples of environment variables: HOSTNAME (name of the computer), SHELL (the current shell), USER, HOME (the user’s home directory)

To establish your own variable, type an assignment statement by inputting variable = value

5
New cards

Redirection

How you control where your input and output go. Normally, your terminal takes input from the keyboard and shows output on the screen. But redirection lets you reroute that flow — for example, to read data from a file or send it into another file or program.

6
New cards

<

Instead of typing data manually, the command reads from a file (Reading from poem.txt as if you typed them)

  • Normally, a program gets its input from your keyboard — you type, it reads, but you might already have that input saved in a file

<p>Instead of typing data manually, the command reads from a file (Reading from poem.txt as if you typed them)</p><ul><li><p>Normally, a program gets its input from your keyboard — you type, it reads, but you might already have that input saved in a file</p></li></ul><p></p>
7
New cards

>

Sends the output of a command to a file, replacing it if it exists.

8
New cards

> >

Same as >, but instead of erasing the file, it adds to the end.

9
New cards

< <

Lets you type multi-line input right inside your command script, ending with a keyword, of use when you want to force a program that accepts its input from file to accept your keyboard input instead

10
New cards

Pipe |

Sends the output of one command as input to another, a pipeline