Bash Scripting Advanced
Filters :
Refers to a set of features used for redirecting either the standard input, which is the keyboard, or the standard output, which is the terminal.
These are shell commands, which :
- Take input from standard input
- Send output to standard output
- Transform input data to output data
- Examples are wc, cat, more, head, sort
- Filters can be chained together
Pipes :
Pipe command - |
- For chaining filter commands : commands1 | commands2
- Here the Output of commands1 is the input of commands2
Summary :
- Shell variables are variables that are limited in scope to the shell in which they were created. Accordingly, shells cannot “see” each other’s shell variables.
- Filters are shell commands or programs such as wc, cat, sort , etc. that transform the input provided to them.
- The pipe operator can be used to create a pipeline of chained filter commands, whereby output of one command becomes the input of another command.
- Shell variables can be assigned values with a simple equal sign, and listed using the ‘set’ command.
- Environment variables are shell variables with scope extended to all child processes of the shell. They are created using the ‘export’ command and listed using the ‘env’ command.
Metacharacters are special characters that have meaning to the shell.
Quoting :
Quoting is used to specify whether the shell should interpret special characters as metacharacters,
or ‘escape’ them
Quoting is used to specify whether the shell should interpret special characters as metacharacters,
or ‘escape’ them
Comments
Post a Comment