*: reorder more input redirections (#18716)

This commit is contained in:
Managor
2025-10-14 11:00:37 +03:00
committed by GitHub
parent c88b75ff17
commit 17b7a5fa55
22 changed files with 25 additions and 25 deletions
+2 -2
View File
@@ -17,7 +17,7 @@
- Read from a specific coprocess `stdout`:
`read {{variable}} <&"${{{name[0]}}}"`
`read <&"${{{name[0]}}}" {{variable}}`
- Create a coprocess which repeatedly reads `stdin` and runs some commands on the input:
@@ -29,4 +29,4 @@
- Create and use a coprocess running `bc`:
`coproc BC { bc --mathlib; }; echo "1/3" >&"${BC[1]}"; read output <&"${BC[0]}"; echo "$output"`
`coproc BC { bc --mathlib; }; echo "1/3" >&"${BC[1]}"; read <&"${BC[0]}" output; echo "$output"`
+1 -1
View File
@@ -14,4 +14,4 @@
- Pick all files from an archive (copy-[i]n), generating directories where needed, in verbose mode:
`cpio {{[-idv|--extract --make-directories --verbose]}} < {{archive.cpio}}`
`cpio < {{archive.cpio}} {{[-idv|--extract --make-directories --verbose]}}`
+1 -1
View File
@@ -12,7 +12,7 @@
- Get the PPD file from `stdin`, showing detailed conformance testing results:
`cupstestppd -v - < {{path/to/file.ppd}}`
`cupstestppd < {{path/to/file.ppd}} -v -`
- Test all PPD files under the current directory, printing the names of each file that does not conform:
+1 -1
View File
@@ -11,7 +11,7 @@
- Query all the DNS records (A, AAAA, CNAME, NS, TXT, SRV, PTR, MX, SOA, AXFR, CAA):
`dnsx -recon {{[-re|-resp]}} <<< {{example.com}}`
`dnsx <<< {{example.com}} -recon {{[-re|-resp]}}`
- Query a specific type of DNS record:
+1 -1
View File
@@ -17,7 +17,7 @@
- Build a Docker image with no build context:
`docker build {{[-t|--tag]}} {{name:tag}} - < {{Dockerfile}}`
`docker < {{Dockerfile}} build {{[-t|--tag]}} {{name:tag}} -`
- Do not use the cache when building the image:
+1 -1
View File
@@ -5,7 +5,7 @@
- Load a Docker image from `stdin`:
`docker load < {{path/to/image_file.tar}}`
`docker < {{path/to/image_file.tar}} load`
- Load a Docker image from a specific file:
+1 -1
View File
@@ -9,7 +9,7 @@
- Bundle a JSX application from `stdin`:
`esbuild --bundle --outfile={{path/to/out.js}} < {{path/to/file.jsx}}`
`esbuild < {{path/to/file.jsx}} --bundle --outfile={{path/to/out.js}}`
- Bundle and minify a JSX application with source maps in `production` mode:
+1 -1
View File
@@ -17,7 +17,7 @@
- Store a key-value pair, reading the value from a file:
`etcdctl put {{my/file}} < {{path/to/file.txt}}`
`etcdctl < {{path/to/file.txt}} put {{my/file}}`
- Save a snapshot of the etcd keystore:
+1 -1
View File
@@ -14,7 +14,7 @@
- Run a pattern with input from a file:
`fabric {{[-p|--pattern]}} {{pattern_name}} < {{path/to/input_file}}`
`fabric < {{path/to/input_file}} {{[-p|--pattern]}} {{pattern_name}}`
- Run a pattern on a YouTube video URL:
+2 -2
View File
@@ -17,11 +17,11 @@
- Move the duplicate files in a TXT file to a different directory:
`fclones move {{path/to/target_directory}} < {{path/to/file.txt}}`
`fclones < {{path/to/file.txt}} move {{path/to/target_directory}}`
- Perform a dry run for soft links in a TXT file without actually linking:
`fclones link --soft < {{path/to/file.txt}} --dry-run 2 > /dev/null`
`fclones < {{path/to/file.txt}} link --soft --dry-run 2 > /dev/null`
- Delete the newest duplicates from the current directory without storing them in a file:
+1 -1
View File
@@ -13,7 +13,7 @@
- Fetch all URLs of several domains from an input file, running multiple threads:
`gau --threads {{4}} < {{path/to/domains.txt}}`
`gau < {{path/to/domains.txt}} --threads {{4}}`
- Write [o]utput results to a file:
+1 -1
View File
@@ -9,7 +9,7 @@
- Set a secret from a file for the current repository:
`gh secret set {{name}} < {{path/to/file}}`
`gh < {{path/to/file}} secret set {{name}}`
- Set a secret for a specific repository:
+1 -1
View File
@@ -21,7 +21,7 @@
- Set a secret from a file for the current repository:
`gh secret set {{name}} < {{path/to/file}}`
`gh < {{path/to/file}} secret set {{name}}`
- Set an organization secret for specific repositories:
+1 -1
View File
@@ -13,7 +13,7 @@
- Use pathnames, one per line, from `stdin`:
`git check-ignore --stdin < {{path/to/file_list}}`
`git < {{path/to/file_list}} check-ignore --stdin`
- Do not check the index (used to debug why paths were tracked and not ignored):
+1 -1
View File
@@ -21,4 +21,4 @@
- Sort and build a tree from `stdin` (non-recursive `git ls-tree` output format is required):
`git mktree < {{path/to/tree.txt}}`
`git < {{path/to/tree.txt}} mktree`
+1 -1
View File
@@ -13,4 +13,4 @@
- Convert all lines in a file into Git comments:
`git stripspace {{[-c|--comment-lines]}} < {{path/to/file}}`
`git < {{path/to/file}} stripspace {{[-c|--comment-lines]}}`
+1 -1
View File
@@ -21,7 +21,7 @@
- Execute SQL statements from a script file:
`mariadb {{db_name}} < {{path/to/script.sql}} > {{path/to/output.tab}}`
`mariadb < {{path/to/script.sql}} {{db_name}} > {{path/to/output.tab}}`
- Check memory and open file usage at exit:
+1 -1
View File
@@ -21,7 +21,7 @@
- Send the contents of a file (`data.txt`), by reading from `stdin` and send the entire input as a message and publish it to `sensors/temperature` topic:
`mosquitto_pub {{[-t|--topic]}} {{sensors/temperature}} {{[-s|--stdin-file]}} < {{data.txt}}`
`mosquitto_pub < {{data.txt}} {{[-t|--topic]}} {{sensors/temperature}} {{[-s|--stdin-file]}}`
- Read newline delimited data from `stdin` as a message and publish it to `sensors/temperature` topic:
+2 -2
View File
@@ -9,7 +9,7 @@
- Display the certificate presented by an SSL/TLS server:
`openssl s_client -connect {{host}}:{{port}} </dev/null`
`openssl < /dev/null s_client -connect {{host}}:{{port}}`
- Set the Server Name Indicator (SNI) when connecting to the SSL/TLS server:
@@ -17,4 +17,4 @@
- Display the complete certificate chain of an HTTPS server:
`openssl s_client -connect {{host}}:443 -showcerts </dev/null`
`openssl < /dev/null s_client -connect {{host}}:443 -showcerts`
+1 -1
View File
@@ -17,7 +17,7 @@
- Assign multiple values to multiple variables:
`read {{_ variable1 _ variable2}} <<< "{{The surname is Bond}}"`
`read <<< "{{The surname is Bond}}" {{_ variable1 _ variable2}}`
- Do not let backslash (\\) act as an escape character:
+1 -1
View File
@@ -14,4 +14,4 @@
- Add/Update comments in a Zip archive from a file:
`zipnote -w {{path/to/file.zip}} < {{path/to/file.txt}}`
`zipnote < {{path/to/file.txt}} -w {{path/to/file.zip}}`
+1 -1
View File
@@ -13,7 +13,7 @@
- Generate a public key from a private key:
`wg pubkey < {{path/to/private_key}} > {{path/to/public_key}}`
`wg < {{path/to/private_key}} pubkey > {{path/to/public_key}}`
- Generate a public and private key: