mirror of
https://github.com/dylanaraps/pure-bash-bible.git
synced 2025-08-22 23:32:49 +02:00
properly built manuscript
This commit is contained in:
@@ -366,7 +366,7 @@ if [[ "$var" == *sub_string ]]; then
|
|||||||
printf '%s\n' "var ends with sub_string."
|
printf '%s\n' "var ends with sub_string."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Inverse (var does not start with sub_string).
|
# Inverse (var does not end with sub_string).
|
||||||
if [[ "$var" != *sub_string ]]; then
|
if [[ "$var" != *sub_string ]]; then
|
||||||
printf '%s\n' "var does not end with sub_string."
|
printf '%s\n' "var does not end with sub_string."
|
||||||
fi
|
fi
|
||||||
|
@@ -32,8 +32,8 @@
|
|||||||
| Expression | What does it do? |
|
| Expression | What does it do? |
|
||||||
| ---------- | ---------------- |
|
| ---------- | ---------------- |
|
||||||
| `file -ef file2` | If both files refer to the same inode and device numbers.
|
| `file -ef file2` | If both files refer to the same inode and device numbers.
|
||||||
| `file -nt file2` | If `file` is newer than `file2` (*uses modification ime*) or `file` exists and `file2` does not.
|
| `file -nt file2` | If `file` is newer than `file2` (*uses modification time*) or `file` exists and `file2` does not.
|
||||||
| `file -ot file2` | If `file` is older than `file2` (*uses modification ime*) or `file2` exists and `file` does not.
|
| `file -ot file2` | If `file` is older than `file2` (*uses modification time*) or `file2` exists and `file` does not.
|
||||||
|
|
||||||
## Variable Conditionals
|
## Variable Conditionals
|
||||||
|
|
||||||
|
@@ -188,7 +188,7 @@ command ls
|
|||||||
|
|
||||||
## Run a command in the background
|
## Run a command in the background
|
||||||
|
|
||||||
This will run the given command and keep it running even after the terminal is closed.
|
This will run the given command and keep it running, even after the terminal or SSH connection is terminated. All output is ignored.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
bkr() {
|
bkr() {
|
||||||
@@ -199,3 +199,4 @@ bkr ./some_script.sh # some_script.sh is now running in the background
|
|||||||
```
|
```
|
||||||
|
|
||||||
<!-- CHAPTER END -->
|
<!-- CHAPTER END -->
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user