Terminal Flashcards
1
Q
output text in red using CONSOLE_CODES
A
printf '\x1b[31hello!\x1b[0m\n' - switch to red - hello! - switch back - line feed \x
2
Q
Influence of teletype machine input
A
- Compact and concise input syntax, making full use of ASCII repertoire to minimise keystrokes
- Output format should be simple and easily usable as input for other programs to parse e.g. one record per line – then we can combine many tools
3
Q
Composition of tools
A
- Programs can be joined together in “pipes” and
- “scripts” to solve more complex problems: call unix tools as subroutines
4
Q
Evolution of many parameters
A
- Each tool originally performed a simple single function
- Prefer reusing existing tools with minor extension to rewriting a new
tool from scratch
5
Q
Shell
A
The main user-interface software (“shell”) is a normal replaceable program without special privileges
- Not part of the kernel … many competing shells developed
- Turned into a full featured programming language to implement scripts that automate routine tasks