Commit 44f59ca8 authored by Vincent Tam's avatar Vincent Tam

Added more bash commands usages

parent c5b2aa45
Pipeline #29363792 passed with stages
in 2 minutes and 53 seconds
......@@ -359,12 +359,24 @@ Display and/or modify connection info.
### less
Show the file in a seperate popup session with some [Vim] like key bindings.
<i class="far fa-eye" aria-hidden></i><span class="fa fa-stack"><i class="far
fa-edit fa-stack-1x"></i><i class="fas fa-ban fa-stack-2x"></i></span><i
class="far fa-file-alt aria-hidden"></i> _View without editing_ the file in a
seperate popup session with some [Vim] like key bindings.
General usage: `less [FILE]`
$ less config.toml
Compare with:
- [`more`](#more): leave _nothing_ on the screen after finish reading `[FILE]`,
ideal for text/code files <i class="far fa-file-alt" aria-hidden></i> /
<i class="far fa-file-code" aria-hidden></i> with a lot of lines.
- [`vim`](#vim): some keys <i class="far fa-keyboard" aria-hidden></i> are
borrowed from [Vim], loads faster due to its limited functionalities. This
suits previewing important files, especially system files.
| Key <i class="far fa-keyboard" aria-hidden></i> | Function |
| --- | --- |
| `b` | Scroll one page **b**ackward |
......@@ -443,6 +455,10 @@ explanations: (in alphabetical order)
I use `-d` with `*` to keep `ls` from expanding the subfolders. <i
class="far fa-folder" aria-hidden></i>.
### man
Display **man**ual page in a separate se.
### more
### openssl
......@@ -488,6 +504,24 @@ allows it to _run in background_.
### shrinkpdf
### shuf
**Shuf**fle input. (_no_ repetition by default)
<i class="fa fa-info-circle" aria-hidden></i> <i class="far fa-flag"
aria-hidden></i> <i class="fas fa-sort-alpha-down" aria-hidden></i> Flags
explanations: (in alphabetical order)
- `-i`: input range
$ shuf -i 1-10 -n 3
4
9
7
- `-n`: output number
- `-r`: allow repetition
### sort
### ssh
......@@ -527,6 +561,34 @@ _without_ showing it (except errors).
Record the time taken for running a command.
General usage: `time [command]`
$ time sleep 5
real 0m5.002s
user 0m0.002s
sys 0m0.000s
### tr
**Tr**anslate or remove a certain characters. Like other
[GNU coreutils][gnu_coreutils] (e.g. [`cat`](#cat), [`grep`](#grep), etc), it
accepts STDIN and/or input file(s), and write to STDOUT.
General usage:
- Replace character
$ tr ' ' '_'
foo bar
foo_bar
- Delete character
$ tr -d ' '
foo bar
foobar
### uniq
Remove duplicate lines of input file(s) or STDIN.
......@@ -582,4 +644,5 @@ P.S. It was my favorite editor.
### xwd
[Vim]: http://www.vim.org
[GIMP]: https://www.gimp.org
\ No newline at end of file
[GIMP]: https://www.gimp.org
[gnu_coreutils]: http://www.gnu.org/s/coreutils/
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment