mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-05 10:46:02 +02:00
Harmonize formatting and capitalization of stdin/stdout/stderr
This commit is contained in:
parent
5284daaa64
commit
cf25745db1
61 changed files with 77 additions and 77 deletions
pages.it/common
pages.zh/osx
pages
common
b2sum.mdbabel.mdbanner.mdbase32.mdbase64.mdbash.mdclamscan.mdcomm.mdcut.mdenvsubst.mdfactor.mdgibo.mdgist.mdgit-check-ignore.mdgit-format-patch.mdgnomon.mdgpg.mdhelp2man.mdhttp.mdiconv.mdjq.mdjson5.mdkafkacat.mdlebab.mdlicense.mdlz4.mdmonodevelop.mdparallel.mdphpmd.mdq.mdrev.mdsamtools.mdscrapy.mdseq.mdsh.mdsshpass.mdsupervisorctl.mdtldrl.mdunzip.mdwhile.mdxz.mdzstd.md
linux
osx
windows
|
@ -3,7 +3,7 @@
|
||||||
> Un transpiler che converte codice JavaScript da sintassi ES6/ES7 ad ES5.
|
> Un transpiler che converte codice JavaScript da sintassi ES6/ES7 ad ES5.
|
||||||
> Maggiori informazioni: <https://babeljs.io/>.
|
> Maggiori informazioni: <https://babeljs.io/>.
|
||||||
|
|
||||||
- Transpila uno specifico file e stampa il risultato su stdout:
|
- Transpila uno specifico file e stampa il risultato su `stdout`:
|
||||||
|
|
||||||
`babel {{percorso/al/file}}`
|
`babel {{percorso/al/file}}`
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
`banner -w {{50}} {{"Hello World"}}`
|
`banner -w {{50}} {{"Hello World"}}`
|
||||||
|
|
||||||
- Leggi testo da stdin:
|
- Leggi testo da `stdin`:
|
||||||
|
|
||||||
`banner`
|
`banner`
|
||||||
|
|
|
@ -10,10 +10,10 @@
|
||||||
|
|
||||||
`base32 -d {{nome_file}}`
|
`base32 -d {{nome_file}}`
|
||||||
|
|
||||||
- Codifica da stdin:
|
- Codifica da `stdin`:
|
||||||
|
|
||||||
`{{comando}} | base32`
|
`{{comando}} | base32`
|
||||||
|
|
||||||
- Decodifica da stdin:
|
- Decodifica da `stdin`:
|
||||||
|
|
||||||
`{{comando}} | base32 -d`
|
`{{comando}} | base32 -d`
|
||||||
|
|
|
@ -10,10 +10,10 @@
|
||||||
|
|
||||||
`base64 -d {{nome_file}}`
|
`base64 -d {{nome_file}}`
|
||||||
|
|
||||||
- Codifica da stdin:
|
- Codifica da `stdin`:
|
||||||
|
|
||||||
`{{comando}} | base64`
|
`{{comando}} | base64`
|
||||||
|
|
||||||
- Decodifica da stdin:
|
- Decodifica da `stdin`:
|
||||||
|
|
||||||
`{{comando}} | base64 -d`
|
`{{comando}} | base64 -d`
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# cut
|
# cut
|
||||||
|
|
||||||
> Taglia dividendo in campi STDIN o file.
|
> Taglia dividendo in campi `stdin` o file.
|
||||||
|
|
||||||
- Estrai i primi 16 caratteri di ogni riga da STDIN:
|
- Estrai i primi 16 caratteri di ogni riga da `stdin`:
|
||||||
|
|
||||||
`cut -c {{1-16}}`
|
`cut -c {{1-16}}`
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# yank
|
# yank
|
||||||
|
|
||||||
> 从 stdin 读取输入并显示一个选择界面,该界面允许选择一个字段并将其复制到剪贴板.
|
> 从 `stdin` 读取输入并显示一个选择界面,该界面允许选择一个字段并将其复制到剪贴板.
|
||||||
|
|
||||||
- 使用默认分隔符 (\f, \n, \r, \s, \t):
|
- 使用默认分隔符 (\f, \n, \r, \s, \t):
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,6 @@
|
||||||
|
|
||||||
`b2sum -c {{filename.b2}}`
|
`b2sum -c {{filename.b2}}`
|
||||||
|
|
||||||
- Calculate the BLAKE2 checksum from stdin:
|
- Calculate the BLAKE2 checksum from `stdin`:
|
||||||
|
|
||||||
`{{somecommand}} | b2sum`
|
`{{somecommand}} | b2sum`
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
> A transpiler which converts code from JavaScript ES6/ES7 syntax to ES5 syntax.
|
> A transpiler which converts code from JavaScript ES6/ES7 syntax to ES5 syntax.
|
||||||
> More information: <https://babeljs.io/>.
|
> More information: <https://babeljs.io/>.
|
||||||
|
|
||||||
- Transpile a specified input file and output to stdout:
|
- Transpile a specified input file and output to `stdout`:
|
||||||
|
|
||||||
`babel {{path/to/file}}`
|
`babel {{path/to/file}}`
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
`banner -w {{50}} {{"Hello World"}}`
|
`banner -w {{50}} {{"Hello World"}}`
|
||||||
|
|
||||||
- Read text from stdin:
|
- Read text from `stdin`:
|
||||||
|
|
||||||
`banner`
|
`banner`
|
||||||
|
|
|
@ -10,10 +10,10 @@
|
||||||
|
|
||||||
`base32 -d {{filename}}`
|
`base32 -d {{filename}}`
|
||||||
|
|
||||||
- Encode from stdin:
|
- Encode from `stdin`:
|
||||||
|
|
||||||
`{{somecommand}} | base32`
|
`{{somecommand}} | base32`
|
||||||
|
|
||||||
- Decode from stdin:
|
- Decode from `stdin`:
|
||||||
|
|
||||||
`{{somecommand}} | base32 -d`
|
`{{somecommand}} | base32 -d`
|
||||||
|
|
|
@ -10,10 +10,10 @@
|
||||||
|
|
||||||
`base64 -d {{filename}}`
|
`base64 -d {{filename}}`
|
||||||
|
|
||||||
- Encode from stdin:
|
- Encode from `stdin`:
|
||||||
|
|
||||||
`{{somecommand}} | base64`
|
`{{somecommand}} | base64`
|
||||||
|
|
||||||
- Decode from stdin:
|
- Decode from `stdin`:
|
||||||
|
|
||||||
`{{somecommand}} | base64 -d`
|
`{{somecommand}} | base64 -d`
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
`bash -e {{file.sh}}`
|
`bash -e {{file.sh}}`
|
||||||
|
|
||||||
- Run commands from STDIN:
|
- Run commands from `stdin`:
|
||||||
|
|
||||||
`bash -s`
|
`bash -s`
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
`clamscan -r {{path/to/directory}}`
|
`clamscan -r {{path/to/directory}}`
|
||||||
|
|
||||||
- Scan data from stdin:
|
- Scan data from `stdin`:
|
||||||
|
|
||||||
`{{command}} | clamscan -`
|
`{{command}} | clamscan -`
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
`comm -12 {{file1}} {{file2}}`
|
`comm -12 {{file1}} {{file2}}`
|
||||||
|
|
||||||
- Print only lines common to both files, reading one file from stdin:
|
- Print only lines common to both files, reading one file from `stdin`:
|
||||||
|
|
||||||
`cat {{file1}} | comm -12 - {{file2}}`
|
`cat {{file1}} | comm -12 - {{file2}}`
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# cut
|
# cut
|
||||||
|
|
||||||
> Cut out fields from STDIN or files.
|
> Cut out fields from `stdin` or files.
|
||||||
|
|
||||||
- Cut out the first sixteen characters of each line of STDIN:
|
- Cut out the first sixteen characters of each line of `stdin`:
|
||||||
|
|
||||||
`cut -c {{1-16}}`
|
`cut -c {{1-16}}`
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
> Substitutes shell format strings with environment variables in text.
|
> Substitutes shell format strings with environment variables in text.
|
||||||
> Strings to be replaced should be in either `${var}` or `$var` format.
|
> Strings to be replaced should be in either `${var}` or `$var` format.
|
||||||
|
|
||||||
- Replace environment variables in stdin and output to stdout:
|
- Replace environment variables in stdin and output to `stdout`:
|
||||||
|
|
||||||
`echo '{{$HOME}}' | envsubst`
|
`echo '{{$HOME}}' | envsubst`
|
||||||
|
|
||||||
- Replace environment variables in an input file and output to stdout:
|
- Replace environment variables in an input file and output to `stdout`:
|
||||||
|
|
||||||
`envsubst < {{path/to/input}}`
|
`envsubst < {{path/to/input}}`
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
|
|
||||||
`factor {{number}}`
|
`factor {{number}}`
|
||||||
|
|
||||||
- Take the input from stdin if no argument is specified:
|
- Take the input from `stdin` if no argument is specified:
|
||||||
|
|
||||||
`echo {{number}} | factor`
|
`echo {{number}} | factor`
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
`gibo list`
|
`gibo list`
|
||||||
|
|
||||||
- Write a boilerplate to stdout:
|
- Write a boilerplate to `stdout`:
|
||||||
|
|
||||||
`gibo dump {{boilerplate}}`
|
`gibo dump {{boilerplate}}`
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
`gist -p -d {{"A meaningful description"}} {{file.txt}} `
|
`gist -p -d {{"A meaningful description"}} {{file.txt}} `
|
||||||
|
|
||||||
- Read contents from STDIN and create a gist from it:
|
- Read contents from `stdin` and create a gist from it:
|
||||||
|
|
||||||
`{{echo "hello world"}} | gist`
|
`{{echo "hello world"}} | gist`
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
`git check-ignore {{path/to/file}} {{path/to/directory}}`
|
`git check-ignore {{path/to/file}} {{path/to/directory}}`
|
||||||
|
|
||||||
- Use pathnames, one per line, from stdin:
|
- Use pathnames, one per line, from `stdin`:
|
||||||
|
|
||||||
`git check-ignore --stdin < {{path/to/file_list}}`
|
`git check-ignore --stdin < {{path/to/file_list}}`
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
`git format-patch {{origin}}`
|
`git format-patch {{origin}}`
|
||||||
|
|
||||||
- Write a .patch file for all the commits between 2 revisions to stdout:
|
- Write a .patch file for all the commits between 2 revisions to `stdout`:
|
||||||
|
|
||||||
`git format-patch {{revision_1}}..{{revision_2}}`
|
`git format-patch {{revision_1}}..{{revision_2}}`
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
> Utility to annotate console logging statements with timestamps and find slow processes.
|
> Utility to annotate console logging statements with timestamps and find slow processes.
|
||||||
> More information: <https://github.com/paypal/gnomon>.
|
> More information: <https://github.com/paypal/gnomon>.
|
||||||
|
|
||||||
- Use UNIX (or DOS) pipes to pipe the stdout of any command through gnomon:
|
- Use UNIX (or DOS) pipes to pipe the `stdout` of any command through gnomon:
|
||||||
|
|
||||||
`{{npm test}} | gnomon`
|
`{{npm test}} | gnomon`
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
`gpg --symmetric {{doc.txt}}`
|
`gpg --symmetric {{doc.txt}}`
|
||||||
|
|
||||||
- Decrypt doc.txt.gpg (output to STDOUT):
|
- Decrypt doc.txt.gpg (output to `stdout`):
|
||||||
|
|
||||||
`gpg --decrypt {{doc.txt.gpg}}`
|
`gpg --decrypt {{doc.txt.gpg}}`
|
||||||
|
|
||||||
|
@ -23,10 +23,10 @@
|
||||||
|
|
||||||
`gpg --import {{public.gpg}}`
|
`gpg --import {{public.gpg}}`
|
||||||
|
|
||||||
- Export public key for alice@example.com (output to STDOUT):
|
- Export public key for alice@example.com (output to `stdout`):
|
||||||
|
|
||||||
`gpg --export --armor {{alice@example.com}}`
|
`gpg --export --armor {{alice@example.com}}`
|
||||||
|
|
||||||
- Export private key for alice@example.com (output to STDOUT):
|
- Export private key for alice@example.com (output to `stdout`):
|
||||||
|
|
||||||
`gpg --export-secret-keys --armor {{alice@example.com}}`
|
`gpg --export-secret-keys --armor {{alice@example.com}}`
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
`help2man {{executable}} --section {{section}}`
|
`help2man {{executable}} --section {{section}}`
|
||||||
|
|
||||||
- Output to a file instead of stdout:
|
- Output to a file instead of `stdout`:
|
||||||
|
|
||||||
`help2man {{executable}} --output {{path/to/file}}`
|
`help2man {{executable}} --output {{path/to/file}}`
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,6 @@
|
||||||
|
|
||||||
`http -a {{username:password}} {{example.org}}`
|
`http -a {{username:password}} {{example.org}}`
|
||||||
|
|
||||||
- Specify raw request body via stdin:
|
- Specify raw request body via `stdin`:
|
||||||
|
|
||||||
`cat {{data.txt}} | http PUT {{example.org}}`
|
`cat {{data.txt}} | http PUT {{example.org}}`
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
> Converts text from one encoding to another.
|
> Converts text from one encoding to another.
|
||||||
|
|
||||||
- Convert file to a specific encoding, and print to stdout:
|
- Convert file to a specific encoding, and print to `stdout`:
|
||||||
|
|
||||||
`iconv -f {{from_encoding}} -t {{to_encoding}} {{input_file}}`
|
`iconv -f {{from_encoding}} -t {{to_encoding}} {{input_file}}`
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
|
|
||||||
`jq .[0] {{file.json}}`
|
`jq .[0] {{file.json}}`
|
||||||
|
|
||||||
- Output the value of a given key of the first element in a JSON text from stdin:
|
- Output the value of a given key of the first element in a JSON text from `stdin`:
|
||||||
|
|
||||||
`cat {{file.json}} | jq .[0].{{key_name}}`
|
`cat {{file.json}} | jq .[0].{{key_name}}`
|
||||||
|
|
||||||
- Output the value of a given key of each element in a JSON text from stdin:
|
- Output the value of a given key of each element in a JSON text from `stdin`:
|
||||||
|
|
||||||
`cat {{file.json}} | jq 'map(.{{key_name}})'`
|
`cat {{file.json}} | jq 'map(.{{key_name}})'`
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
> A command-line tool for converting JSON5 files to JSON.
|
> A command-line tool for converting JSON5 files to JSON.
|
||||||
> More information: <https://json5.org>.
|
> More information: <https://json5.org>.
|
||||||
|
|
||||||
- Convert JSON5 stdin to JSON stdout:
|
- Convert JSON5 stdin to JSON `stdout`:
|
||||||
|
|
||||||
`echo {{input}} | json5`
|
`echo {{input}} | json5`
|
||||||
|
|
||||||
- Convert a JSON5 file to JSON and output to stdout:
|
- Convert a JSON5 file to JSON and output to `stdout`:
|
||||||
|
|
||||||
`json5 {{path/to/input_file.json5}}`
|
`json5 {{path/to/input_file.json5}}`
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
`kafkacat -G {{group_id}} {{topic}} -b {{brokers}}`
|
`kafkacat -G {{group_id}} {{topic}} -b {{brokers}}`
|
||||||
|
|
||||||
- Publish message by reading from stdin:
|
- Publish message by reading from `stdin`:
|
||||||
|
|
||||||
` echo {{message}} | kafkacat -P -t {{topic}} -b {{brokers}}`
|
` echo {{message}} | kafkacat -P -t {{topic}} -b {{brokers}}`
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
`lebab --transform {{transformation}}`
|
`lebab --transform {{transformation}}`
|
||||||
|
|
||||||
- Transpile a file to stdout:
|
- Transpile a file to `stdout`:
|
||||||
|
|
||||||
`lebab {{path/to/input_file}}`
|
`lebab {{path/to/input_file}}`
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
> Create license files for open-source projects.
|
> Create license files for open-source projects.
|
||||||
> More information: <https://nishanths.github.io/license>.
|
> More information: <https://nishanths.github.io/license>.
|
||||||
|
|
||||||
- Print a license to stdout, using the defaults (auto-detected author name, and current year):
|
- Print a license to `stdout`, using the defaults (auto-detected author name, and current year):
|
||||||
|
|
||||||
`license {{license_name}}`
|
`license {{license_name}}`
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
`lz4 -d {{file.lz4}}`
|
`lz4 -d {{file.lz4}}`
|
||||||
|
|
||||||
- Decompress a file and write to stdout:
|
- Decompress a file and write to `stdout`:
|
||||||
|
|
||||||
`lz4 -dc {{file.lz4}}`
|
`lz4 -dc {{file.lz4}}`
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
`monodevelop --new-window`
|
`monodevelop --new-window`
|
||||||
|
|
||||||
- Disable redirection of stdout and stderr to a log file:
|
- Disable redirection of `stdout` and stderr to a log file:
|
||||||
|
|
||||||
`monodevelop --no-redirect`
|
`monodevelop --no-redirect`
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
`parallel gzip ::: {{file1}} {{file2}} {{file3}}`
|
`parallel gzip ::: {{file1}} {{file2}} {{file3}}`
|
||||||
|
|
||||||
- Read arguments from stdin, run 4 jobs at once:
|
- Read arguments from `stdin`, run 4 jobs at once:
|
||||||
|
|
||||||
`ls *.txt | parallel -j4 gzip`
|
`ls *.txt | parallel -j4 gzip`
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
`{{args}} | parallel -X {{command}}`
|
`{{args}} | parallel -X {{command}}`
|
||||||
|
|
||||||
- Break stdin into ~1M blocks, feed each block to stdin of new command:
|
- Break stdin into ~1M blocks, feed each block to `stdin` of new command:
|
||||||
|
|
||||||
`cat {{big_file.txt}} | parallel --pipe --block 1M {{command}}`
|
`cat {{big_file.txt}} | parallel --pipe --block 1M {{command}}`
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
`phpmd {{path/to/file_or_directory}} {{xml|text|html}} {{rulesets}} --exclude {{directory_patterns}}`
|
`phpmd {{path/to/file_or_directory}} {{xml|text|html}} {{rulesets}} --exclude {{directory_patterns}}`
|
||||||
|
|
||||||
- Output the results to a file instead of stdout:
|
- Output the results to a file instead of `stdout`:
|
||||||
|
|
||||||
`phpmd {{path/to/file_or_directory}} {{xml|text|html}} {{rulesets}} --reportfile {{path/to/report_file}}`
|
`phpmd {{path/to/file_or_directory}} {{xml|text|html}} {{rulesets}} --reportfile {{path/to/report_file}}`
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
`q -d{{delimiter}} -H "SELECT * from {{path/to/file}}"`
|
`q -d{{delimiter}} -H "SELECT * from {{path/to/file}}"`
|
||||||
|
|
||||||
- Read data from stdin; '-' in the query represents the data from stdin:
|
- Read data from stdin; '-' in the query represents the data from `stdin`:
|
||||||
|
|
||||||
`{{output}} | q "select * from -"`
|
`{{output}} | q "select * from -"`
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
|
|
||||||
`echo "hello" | rev`
|
`echo "hello" | rev`
|
||||||
|
|
||||||
- Reverse an entire file and print to stdout:
|
- Reverse an entire file and print to `stdout`:
|
||||||
|
|
||||||
`rev {{file}}`
|
`rev {{file}}`
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
`samtools view -S -b {{input.sam}} > {{output.bam}}`
|
`samtools view -S -b {{input.sam}} > {{output.bam}}`
|
||||||
|
|
||||||
- Take input from stdin (-) and print the SAM header and any reads overlapping a specific region to stdout:
|
- Take input from stdin (-) and print the SAM header and any reads overlapping a specific region to `stdout`:
|
||||||
|
|
||||||
`{{other_command}} | samtools view -h - chromosome:start-end`
|
`{{other_command}} | samtools view -h - chromosome:start-end`
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
`scrapy crawl {{spider_name}}`
|
`scrapy crawl {{spider_name}}`
|
||||||
|
|
||||||
- Fetch a webpage as scrapy sees it and print source in stdout:
|
- Fetch a webpage as scrapy sees it and print source in `stdout`:
|
||||||
|
|
||||||
`scrapy fetch {{url}}`
|
`scrapy fetch {{url}}`
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# seq
|
# seq
|
||||||
|
|
||||||
> Output a sequence of numbers to stdout.
|
> Output a sequence of numbers to `stdout`.
|
||||||
|
|
||||||
- Sequence from 1 to 10:
|
- Sequence from 1 to 10:
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,6 @@
|
||||||
|
|
||||||
`sh {{file.sh}}`
|
`sh {{file.sh}}`
|
||||||
|
|
||||||
- Run commands from STDIN:
|
- Run commands from `stdin`:
|
||||||
|
|
||||||
`sh -s`
|
`sh -s`
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# sshpass
|
# sshpass
|
||||||
|
|
||||||
> An ssh password provider.
|
> An ssh password provider.
|
||||||
> It works by creating a TTY, feeding the password into it, and then redirecting stdin to the ssh session.
|
> It works by creating a TTY, feeding the password into it, and then redirecting `stdin` to the ssh session.
|
||||||
|
|
||||||
- Connect to a remote server using a password supplied on a file descriptor (in this case, stdin):
|
- Connect to a remote server using a password supplied on a file descriptor (in this case, `stdin`):
|
||||||
|
|
||||||
`sshpass -d {{0}} ssh {{user}}@{{hostname}}`
|
`sshpass -d {{0}} ssh {{user}}@{{hostname}}`
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,11 @@
|
||||||
|
|
||||||
`supervisorctl {{start|stop|restart}} {{group_name}}:*`
|
`supervisorctl {{start|stop|restart}} {{group_name}}:*`
|
||||||
|
|
||||||
- Show last 100 **bytes** of process stderr:
|
- Show last 100 **bytes** of process `stderr`:
|
||||||
|
|
||||||
`supervisorctl tail -100 {{process_name}} stderr`
|
`supervisorctl tail -100 {{process_name}} stderr`
|
||||||
|
|
||||||
- Keep displaying stdout of a process:
|
- Keep displaying `stdout` of a process:
|
||||||
|
|
||||||
`supervisorctl tail -f {{process_name}} stdout`
|
`supervisorctl tail -f {{process_name}} stdout`
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
`tldrl {{pages_directory}}`
|
`tldrl {{pages_directory}}`
|
||||||
|
|
||||||
- Format a specific page to stdout:
|
- Format a specific page to `stdout`:
|
||||||
|
|
||||||
`tldrl -f {{page.md}}`
|
`tldrl -f {{page.md}}`
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
`unzip -l {{file.zip}}`
|
`unzip -l {{file.zip}}`
|
||||||
|
|
||||||
- Extract the contents of the file(s) to stdout alongside the extracted file names:
|
- Extract the contents of the file(s) to `stdout` alongside the extracted file names:
|
||||||
|
|
||||||
`unzip -c {{file.zip}}`
|
`unzip -c {{file.zip}}`
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
> Simple shell loop.
|
> Simple shell loop.
|
||||||
|
|
||||||
- Read stdin and perform an action on every line:
|
- Read `stdin` and perform an action on every line:
|
||||||
|
|
||||||
`while read line; do echo "$line"; done`
|
`while read line; do echo "$line"; done`
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
`xz -d --format=lzma {{file.lzma}}`
|
`xz -d --format=lzma {{file.lzma}}`
|
||||||
|
|
||||||
- Decompress a file and write to stdout:
|
- Decompress a file and write to `stdout`:
|
||||||
|
|
||||||
`xz -dc {{file.xz}}`
|
`xz -dc {{file.xz}}`
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
`zstd -d {{file}}.zst`
|
`zstd -d {{file}}.zst`
|
||||||
|
|
||||||
- Decompress to stdout:
|
- Decompress to `stdout`:
|
||||||
|
|
||||||
`zstd -dc {{file}}.zst`
|
`zstd -dc {{file}}.zst`
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
`dbus-daemon --address {{address}}`
|
`dbus-daemon --address {{address}}`
|
||||||
|
|
||||||
- Output the process id to stdout:
|
- Output the process id to `stdout`:
|
||||||
|
|
||||||
`dbus-daemon --print-pid`
|
`dbus-daemon --print-pid`
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
`isoinfo -f -i {{path/to/image.iso}}`
|
`isoinfo -f -i {{path/to/image.iso}}`
|
||||||
|
|
||||||
- E[x]tract a specific file from an ISO image and send it out stdout:
|
- E[x]tract a specific file from an ISO image and send it out `stdout`:
|
||||||
|
|
||||||
`isoinfo -i {{path/to/image.iso}} -x {{/PATH/TO/FILE/INSIDE/ISO.EXT}}`
|
`isoinfo -i {{path/to/image.iso}} -x {{/PATH/TO/FILE/INSIDE/ISO.EXT}}`
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
`logger {{message}}`
|
`logger {{message}}`
|
||||||
|
|
||||||
- Take input from stdin and log to syslog:
|
- Take input from `stdin` and log to syslog:
|
||||||
|
|
||||||
`echo {{log_entry}} | logger`
|
`echo {{log_entry}} | logger`
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,6 @@
|
||||||
|
|
||||||
`lslocks --pid {{PID}}`
|
`lslocks --pid {{PID}}`
|
||||||
|
|
||||||
- List locks with json output to stdout:
|
- List locks with json output to `stdout`:
|
||||||
|
|
||||||
`lslocks --json`
|
`lslocks --json`
|
||||||
|
|
|
@ -18,6 +18,6 @@
|
||||||
|
|
||||||
`shasum --check {{list_file}}`
|
`shasum --check {{list_file}}`
|
||||||
|
|
||||||
- Calculate the SHA1 checksum from stdin:
|
- Calculate the SHA1 checksum from `stdin`:
|
||||||
|
|
||||||
`{{somecommand}} | shasum`
|
`{{somecommand}} | shasum`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# yank
|
# yank
|
||||||
|
|
||||||
> Read input from stdin and display a selection interface that allows a field to be selected and copied to the clipboard.
|
> Read input from `stdin` and display a selection interface that allows a field to be selected and copied to the clipboard.
|
||||||
|
|
||||||
- Yank using the default delimiters (\f, \n, \r, \s, \t):
|
- Yank using the default delimiters (\f, \n, \r, \s, \t):
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,10 @@
|
||||||
|
|
||||||
`base64 -D -i {{base64_file}}`
|
`base64 -D -i {{base64_file}}`
|
||||||
|
|
||||||
- Encode from stdin:
|
- Encode from `stdin`:
|
||||||
|
|
||||||
`echo -n {{plain_text}} | base64`
|
`echo -n {{plain_text}} | base64`
|
||||||
|
|
||||||
- Decode from stdin:
|
- Decode from `stdin`:
|
||||||
|
|
||||||
`echo -n {{base64_text}} | base64 -D`
|
`echo -n {{base64_text}} | base64 -D`
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
`logger {{message}}`
|
`logger {{message}}`
|
||||||
|
|
||||||
- Take input from stdin and log to syslog:
|
- Take input from `stdin` and log to syslog:
|
||||||
|
|
||||||
`echo {{log_entry}} | logger`
|
`echo {{log_entry}} | logger`
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,6 @@
|
||||||
|
|
||||||
`shasum --check {{list_file}}`
|
`shasum --check {{list_file}}`
|
||||||
|
|
||||||
- Calculate the SHA1 checksum from stdin:
|
- Calculate the SHA1 checksum from `stdin`:
|
||||||
|
|
||||||
`{{somecommand}} | shasum`
|
`{{somecommand}} | shasum`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# yank
|
# yank
|
||||||
|
|
||||||
> Read input from stdin and display a selection interface that allows a field to be selected and copied to the clipboard.
|
> Read input from `stdin` and display a selection interface that allows a field to be selected and copied to the clipboard.
|
||||||
|
|
||||||
- Yank using the default delimiters (\f, \n, \r, \s, \t):
|
- Yank using the default delimiters (\f, \n, \r, \s, \t):
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# more
|
# more
|
||||||
|
|
||||||
> Display paginated output from stdin or a file.
|
> Display paginated output from `stdin` or a file.
|
||||||
|
|
||||||
- Display paginated output from stdin:
|
- Display paginated output from `stdin`:
|
||||||
|
|
||||||
`{{echo test}} | more`
|
`{{echo test}} | more`
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
`msg {{username|session_name|session_id}} {{message}}`
|
`msg {{username|session_name|session_id}} {{message}}`
|
||||||
|
|
||||||
- Send a message from stdin:
|
- Send a message from `stdin`:
|
||||||
|
|
||||||
`echo "{{message}}" | msg {{username|session_name|session_id}}`
|
`echo "{{message}}" | msg {{username|session_name|session_id}}`
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,6 @@
|
||||||
|
|
||||||
`rdpsign {{path/to/file.rdp}} /v`
|
`rdpsign {{path/to/file.rdp}} /v`
|
||||||
|
|
||||||
- Test the signing by displaying the output to stdout without updating the file:
|
- Test the signing by displaying the output to `stdout` without updating the file:
|
||||||
|
|
||||||
`rdpsign {{path/to/file.rdp}} /l`
|
`rdpsign {{path/to/file.rdp}} /l`
|
||||||
|
|
Loading…
Add table
Reference in a new issue