Contents
What does dot mean in terminal?
dot) means the current directory you’re in. .. (dot dot) means the parent directory of the current directory you’re in. For example, if you’re in foo/bar/ , . will represent bar/ , .. will represent foo/ .
What do the two dots and the slash in the displayed reference mean?
The dot-slash, ./ , is a relative path to something in the current directory. The dot is the current directory and the slash is a path delimiter.
What is a backslash in bash?
A non-quoted backslash ‘ \ ‘ is the Bash escape character. It preserves the literal value of the next character that follows, with the exception of newline .
What does before a command mean?
The shell waits for all commands in the pipeline to terminate before returning a value. This means that ! preceding a command is negating the exit status of it: $ echo 23 23 $ echo $? 0 # But $ !
When to use a dot and a backslash?
Dot (.) and backslash (\\) Some characters have one meaning in regular expressions and completely different meanings in other contexts. For example, in regular expressions, the dot (.) is a special character used to match any one character. In written language, the period (.) is used to indicate the end of a sentence.
What does a backslash do in the shell?
A backslash escapes the next character from being interpreted by the shell. If the next character is a newline, then the newline will not be interpreted as the end of the command by the shell. It effectively allows the a command to span multiple lines. Notice that the last line does not end with \\ since it is not continued on the next line.
When does a backslash look like an error?
That looks like an error, if the line is to be interpreted by itself. A backslash escapes the next character from being interpreted by the shell. If the next character is a newline, then the newline will not be interpreted as the end of the command by the shell.
When to use the backslash to escape a character?
Use the backslash to escape any special character and interpret it literally; for example: 1 \\\\ (escapes the backslash) 2 \\ [ (escapes the bracket) 3 \\ { (escapes the curly brace) 4 \\. (escapes the dot)