Shell
In this page will refer as shell to the device that allows to communicate with the system, including terminal,
shells and control characters (think about Ctrl-v
in the shell).
Normally in the interaction with a client you have to take into account
- the terminal
- the shell
- the application
so, if we want to rename a file named -|^C
to foo
you have to issue the following
keys sequence
m v Space . / - \ | Ctrl-V Ctrl-C Space f o o Return
into the terminal.
Take into account also the path separator and the syntax behind it.
Console&TTY
An useful diagram from here
- How to use arguments from previous command?
- Programming with ANSI escape codes
- The TTY demystified
- Abusing the FILE structure
- http://blog.hostilefork.com/where-printf-rubber-meets-road/
- https://sourceware.org/glibc/wiki/LibioVtables
- SO question and answer What are the responsibilities of each Pseudo-Terminal (PTY) component (software, master side, slave side)?
- !!Con West 2019 - Tabitha Sable: My, my, TTY!
Links
- dylanaraps/pure-bash-bible A collection of pure bash alternatives to external processes
- Google Bash style guide
- http://resources.mpi-inf.mpg.de/departments/rg1/teaching/unixffb-ss98/quoting-guide.html
- http://twistedoakstudios.com/blog/Post4872_dont-treat-paths-like-strings
- Why Bash is like that: suid
- buffering in standard streams
- Command Injection Without Spaces
- HINTS FOR WRITING UNIX TOOLS
- PIPES, FORKS, & DUPS: UNDERSTANDING COMMAND EXECUTION AND INPUT/OUTPUT DATA FLOW
- What exactly was the point of
[ “x$var” = “xval” ]
?