From 9fefa2ebceed1b6be35dd27fdacf60fdc4b20175 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Thu, 9 Oct 2025 06:55:58 +0300 Subject: [PATCH] *: reorder input redirect (#18571) --- pages/common/antibody.md | 2 +- pages/common/copyq.md | 4 ++-- pages/common/enca.md | 2 +- pages/common/envsubst.md | 2 +- pages/common/kubeseal.md | 10 +++++----- pages/common/mailx.md | 2 +- pages/common/mods.md | 4 ++-- pages/common/mysql.md | 4 ++-- pages/common/nc.md | 2 +- pages/common/pampick.md | 2 +- pages/common/pamshadedrelief.md | 2 +- pages/common/patch.md | 8 ++++---- pages/common/pbmtobbnbg.md | 2 +- pages/common/protoc.md | 6 +++--- pages/common/readarray.md | 6 +++--- pages/common/scheme.md | 2 +- pages/common/sendmail.md | 6 +++--- pages/common/stl2gts.md | 6 +++--- pages/common/tgpt.md | 2 +- pages/common/tr.md | 12 ++++++------ pages/common/zlib-flate.md | 6 +++--- pages/linux/ip-rule.md | 2 +- pages/linux/lxc-profile.md | 2 +- pages/linux/sfdisk.md | 2 +- pages/linux/sqfstar.md | 2 +- 25 files changed, 50 insertions(+), 50 deletions(-) diff --git a/pages/common/antibody.md b/pages/common/antibody.md index 5eeccd93a6..a509c03423 100644 --- a/pages/common/antibody.md +++ b/pages/common/antibody.md @@ -5,7 +5,7 @@ - Bundle all plugins for static loading: -`antibody bundle < {{~/.zsh_plugins.txt}} > {{~/.zsh_plugins.sh}}` +`antibody < {{~/.zsh_plugins.txt}} bundle > {{~/.zsh_plugins.sh}}` - Update all bundles: diff --git a/pages/common/copyq.md b/pages/common/copyq.md index 75a4f9b462..7d4fcf8c1c 100644 --- a/pages/common/copyq.md +++ b/pages/common/copyq.md @@ -25,8 +25,8 @@ - Copy a file's contents into the clipboard: -`copyq copy < {{path/to/file.txt}}` +`copyq < {{path/to/file.txt}} copy` - Copy a JPEG image into the clipboard: -`copyq copy image/jpeg < {{path/to/image.jpg}}` +`copyq < {{path/to/image.jpg}} copy image/jpeg` diff --git a/pages/common/enca.md b/pages/common/enca.md index 05b3108cf2..c79f516878 100644 --- a/pages/common/enca.md +++ b/pages/common/enca.md @@ -17,4 +17,4 @@ - Create a copy of an existing file using a different encoding: -`enca {{[-L|--language]}} {{language}} {{[-x|--convert-to]}} {{to_encoding}} < {{original_file}} > {{new_file}}` +`enca < {{original_file}} {{[-L|--language]}} {{language}} {{[-x|--convert-to]}} {{to_encoding}} > {{new_file}}` diff --git a/pages/common/envsubst.md b/pages/common/envsubst.md index 0432fa2127..de93f4eae7 100644 --- a/pages/common/envsubst.md +++ b/pages/common/envsubst.md @@ -18,4 +18,4 @@ - Replace environment variables in an input file from a space-separated list: -`envsubst '{{$USER $SHELL $HOME}}' < {{path/to/input_file}}` +`envsubst < {{path/to/input_file}} '{{$USER $SHELL $HOME}}'` diff --git a/pages/common/kubeseal.md b/pages/common/kubeseal.md index 4ec5686661..463e47b67f 100644 --- a/pages/common/kubeseal.md +++ b/pages/common/kubeseal.md @@ -11,11 +11,11 @@ - Encrypt a secret, outputting it in YAML or JSON format, using a bearer token for API authentication: -`kubeseal {{[-o|--format]}} {{yaml|json}} --token {{my-bearer-token}} < {{secret.yaml}} > {{sealedsecret.yaml}}` +`kubeseal < {{secret.yaml}} {{[-o|--format]}} {{yaml|json}} --token {{my-bearer-token}} > {{sealedsecret.yaml}}` - Seal a secret using a specific controller namespace of sealed-secrets controller and name: -`kubeseal --controller-namespace {{controller-namespace}} --controller-name {{controller-name}} < {{secret.yaml}} > {{sealedsecret.yaml}}` +`kubeseal < {{secret.yaml}} --controller-namespace {{controller-namespace}} --controller-name {{controller-name}} > {{sealedsecret.yaml}}` - Encrypt a raw secret value from a file with a specified name and scope: @@ -27,12 +27,12 @@ - Seal a secret offline using a fetched certificate: -`kubeseal --cert {{cert.pem}} < {{secret.yaml}} > {{sealedsecret.yaml}}` +`kubeseal < {{secret.yaml}} --cert {{cert.pem}} > {{sealedsecret.yaml}}` - Merge a secret into an existing SealedSecret file in-place: -`kubeseal --merge-into {{sealedsecret.yaml}} < {{secret.yaml}}` +`kubeseal < {{secret.yaml}} --merge-into {{sealedsecret.yaml}}` - Validate a SealedSecret without applying it: -`kubeseal --validate < {{sealedsecret.yaml}}` +`kubeseal < {{sealedsecret.yaml}} --validate` diff --git a/pages/common/mailx.md b/pages/common/mailx.md index 64060b6fbf..483799b238 100644 --- a/pages/common/mailx.md +++ b/pages/common/mailx.md @@ -13,7 +13,7 @@ - Send mail with content read from a file: -`mailx {{[-s|--subject]}} "{{subject}}" {{to_addr}} < {{content.txt}}` +`mailx < {{content.txt}} {{[-s|--subject]}} "{{subject}}" {{to_addr}}` - Send mail to a recipient and CC to another address: diff --git a/pages/common/mods.md b/pages/common/mods.md index 4789c80821..41f0dae106 100644 --- a/pages/common/mods.md +++ b/pages/common/mods.md @@ -13,11 +13,11 @@ - Ask for comments on your code, in markdown format: -`mods --format "{{what are your thoughts on improving this code?}}" < {{path/to/file}}` +`mods < {{path/to/file}} --format "{{what are your thoughts on improving this code?}}"` - Ask for help with your documentation, in markdown format: -`mods --format "{{write a new section to this readme for a feature that sends you a free rabbit if you hit r}}" < {{README.md}}` +`mods < {{README.md}} --format "{{write a new section to this readme for a feature that sends you a free rabbit if you hit r}}"` - Organize your videos, in markdown format: diff --git a/pages/common/mysql.md b/pages/common/mysql.md index 4eb3c46593..3539cb5043 100644 --- a/pages/common/mysql.md +++ b/pages/common/mysql.md @@ -25,8 +25,8 @@ - Restore a database from a backup created with `mysqldump` (user will be prompted for a password): -`mysql {{[-u|--user]}} {{user}} {{[-p|--password]}} {{database_name}} < {{path/to/backup.sql}}` +`mysql < {{path/to/backup.sql}} {{[-u|--user]}} {{user}} {{[-p|--password]}} {{database_name}}` - Restore all databases from a backup (user will be prompted for a password): -`mysql {{[-u|--user]}} {{user}} {{[-p|--password]}} < {{path/to/backup.sql}}` +`mysql < {{path/to/backup.sql}} {{[-u|--user]}} {{user}} {{[-p|--password]}}` diff --git a/pages/common/nc.md b/pages/common/nc.md index 7d0ea38dbe..25f4668dfb 100644 --- a/pages/common/nc.md +++ b/pages/common/nc.md @@ -5,7 +5,7 @@ - Start a listener on the specified TCP port and send a file into it: -`nc -l -p {{port}} < {{filename}}` +`nc < {{filename}} -l -p {{port}}` - Connect to a target listener on the specified port and receive a file from it: diff --git a/pages/common/pampick.md b/pages/common/pampick.md index d0b18669b8..bd13ae6015 100644 --- a/pages/common/pampick.md +++ b/pages/common/pampick.md @@ -6,4 +6,4 @@ - Execute a shell command on each image in a Netpbm file: -`pampick {{image_number1 image_number2 ...}} < {{path/to/image.pam}} > {{path/to/output.pam}}` +`pampick < {{path/to/image.pam}} {{image_number1 image_number2 ...}} > {{path/to/output.pam}}` diff --git a/pages/common/pamshadedrelief.md b/pages/common/pamshadedrelief.md index e7778e9e61..dbcfbfdc96 100644 --- a/pages/common/pamshadedrelief.md +++ b/pages/common/pamshadedrelief.md @@ -10,4 +10,4 @@ - Gamma adjust the image by the specified factor: -`pamshadedrelief {{[-g|-gamma]}} {{factor}} < {{path/to/input.pam}} > {{path/to/output.pam}}` +`pamshadedrelief < {{path/to/input.pam}} {{[-g|-gamma]}} {{factor}} > {{path/to/output.pam}}` diff --git a/pages/common/patch.md b/pages/common/patch.md index 67f98f036e..f36154967d 100644 --- a/pages/common/patch.md +++ b/pages/common/patch.md @@ -10,16 +10,16 @@ - Apply a patch to a specific file: -`patch {{path/to/file}} < {{patch.diff}}` +`patch < {{patch.diff}} {{path/to/file}}` - Patch a file writing the result to a different file: -`patch {{path/to/input_file}} {{[-o|--output]}} {{path/to/output_file}} < {{patch.diff}}` +`patch < {{patch.diff}} {{path/to/input_file}} {{[-o|--output]}} {{path/to/output_file}}` - Apply a patch to the current directory: -`patch {{[-p|--strip]}} 1 < {{patch.diff}}` +`patch < {{patch.diff}} {{[-p|--strip]}} 1` - Apply the reverse of a patch: -`patch {{[-R|--reverse]}} < {{patch.diff}}` +`patch < {{patch.diff}} {{[-R|--reverse]}}` diff --git a/pages/common/pbmtobbnbg.md b/pages/common/pbmtobbnbg.md index 6ccdbf14a3..494413c96c 100644 --- a/pages/common/pbmtobbnbg.md +++ b/pages/common/pbmtobbnbg.md @@ -9,4 +9,4 @@ - Specify the rasterop: -`pbmtobbnbg {{3}} < {{path/to/image.pbm}} > {{path/to/output.dpd}}` +`pbmtobbnbg < {{path/to/image.pbm}} {{3}} > {{path/to/output.dpd}}` diff --git a/pages/common/protoc.md b/pages/common/protoc.md index 856138ea7c..e47057aa96 100644 --- a/pages/common/protoc.md +++ b/pages/common/protoc.md @@ -17,12 +17,12 @@ - Encode a text-format message into a protocol message from a `.proto` file: -`protoc --encode={{TypeName}} {{input_file.proto}} < {{message.txt}}` +`protoc < {{message.txt}} --encode={{TypeName}} {{input_file.proto}}` - Decode a protocol message into text-format from a `.proto` file: -`protoc --decode={{TypeName}} {{input_file.proto}} < {{message.bin}}` +`protoc < {{message.bin}} --decode={{TypeName}} {{input_file.proto}}` - Decode a protocol message into raw tag/value pairs: -`protoc --decode_raw < {{message.bin}}` +`protoc < {{message.bin}} --decode_raw` diff --git a/pages/common/readarray.md b/pages/common/readarray.md index 52162c36c6..710cba3844 100644 --- a/pages/common/readarray.md +++ b/pages/common/readarray.md @@ -9,15 +9,15 @@ - Read lines from a file and insert them in an array: -`readarray {{array_name}} < {{path/to/file.txt}}` +`readarray < {{path/to/file.txt}} {{array_name}}` - Remove trailing deliminators (newline by default): -`readarray -t {{array_name}} < {{path/to/file.txt}}` +`readarray < {{path/to/file.txt}} -t {{array_name}}` - Copy at most `n` lines: -`readarray -n {{n}} {{array_name}} < {{path/to/file.txt}}` +`readarray < {{path/to/file.txt}} -n {{n}} {{array_name}}` - Display help: diff --git a/pages/common/scheme.md b/pages/common/scheme.md index fe6fab8f3b..6a86172ce5 100644 --- a/pages/common/scheme.md +++ b/pages/common/scheme.md @@ -9,7 +9,7 @@ - Run a scheme program (with no REPL output): -`scheme --quiet < {{script.scm}}` +`scheme < {{script.scm}} --quiet` - Load a scheme program into the REPL: diff --git a/pages/common/sendmail.md b/pages/common/sendmail.md index 5cd4f436f0..eb16658925 100644 --- a/pages/common/sendmail.md +++ b/pages/common/sendmail.md @@ -5,12 +5,12 @@ - Send a message with the content of `message.txt` to the mail directory of local user `username`: -`sendmail {{username}} < {{message.txt}}` +`sendmail < {{message.txt}} {{username}}` - Send an email from you@yourdomain.com (assuming the mail server is configured for this) to test@gmail.com containing the message in `message.txt`: -`sendmail -f {{you@yourdomain.com}} {{test@gmail.com}} < {{message.txt}}` +`sendmail < {{message.txt}} -f {{you@yourdomain.com}} {{test@gmail.com}}` - Send an email from you@yourdomain.com (assuming the mail server is configured for this) to test@gmail.com containing the file `file.zip`: -`sendmail -f {{you@yourdomain.com}} {{test@gmail.com}} < {{file.zip}}` +`sendmail < {{file.zip}} -f {{you@yourdomain.com}} {{test@gmail.com}}` diff --git a/pages/common/stl2gts.md b/pages/common/stl2gts.md index 5e0e82b0b4..3cdd086543 100644 --- a/pages/common/stl2gts.md +++ b/pages/common/stl2gts.md @@ -9,15 +9,15 @@ - Convert an STL file to a GTS file and revert face normals: -`stl2gts --revert < {{path/to/file.stl}} > {{path/to/file.gts}}` +`stl2gts < {{path/to/file.stl}} --revert > {{path/to/file.gts}}` - Convert an STL file to a GTS file and do not merge vertices: -`stl2gts --nomerge < {{path/to/file.stl}} > {{path/to/file.gts}}` +`stl2gts < {{path/to/file.stl}} --nomerge > {{path/to/file.gts}}` - Convert an STL file to a GTS file and display surface statistics: -`stl2gts --verbose < {{path/to/file.stl}} > {{path/to/file.gts}}` +`stl2gts < {{path/to/file.stl}} --verbose > {{path/to/file.gts}}` - Display help: diff --git a/pages/common/tgpt.md b/pages/common/tgpt.md index e2879cb5c1..255efa13b0 100644 --- a/pages/common/tgpt.md +++ b/pages/common/tgpt.md @@ -34,4 +34,4 @@ - Feed a file as additional pre-prompt input: -`tgpt --provider {{blackboxai}} "{{prompt}}" < {{path/to/file}}` +`tgpt < {{path/to/file}} --provider {{blackboxai}} "{{prompt}}"` diff --git a/pages/common/tr.md b/pages/common/tr.md index 705758a773..0d9ac3cac1 100644 --- a/pages/common/tr.md +++ b/pages/common/tr.md @@ -5,7 +5,7 @@ - Replace all occurrences of a character in a file, and print the result: -`tr {{find_character}} {{replace_character}} < {{path/to/file}}` +`tr < {{path/to/file}} {{find_character}} {{replace_character}}` - Replace all occurrences of a character from another command's output: @@ -13,20 +13,20 @@ - Map each character of the first set to the corresponding character of the second set: -`tr '{{abcd}}' '{{jkmn}}' < {{path/to/file}}` +`tr < {{path/to/file}} '{{abcd}}' '{{jkmn}}'` - Delete all occurrences of the specified set of characters from the input: -`tr {{[-d|--delete]}} '{{input_characters}}' < {{path/to/file}}` +`tr < {{path/to/file}} {{[-d|--delete]}} '{{input_characters}}'` - Compress a series of identical characters to a single character: -`tr {{[-s|--squeeze-repeats]}} '{{input_characters}}' < {{path/to/file}}` +`tr < {{path/to/file}} {{[-s|--squeeze-repeats]}} '{{input_characters}}'` - Translate the contents of a file to upper-case: -`tr "[:lower:]" "[:upper:]" < {{path/to/file}}` +`tr < {{path/to/file}} "[:lower:]" "[:upper:]"` - Strip out non-printable characters from a file: -`tr {{[-cd|--complement --delete]}} "[:print:]" < {{path/to/file}}` +`tr < {{path/to/file}} {{[-cd|--complement --delete]}} "[:print:]"` diff --git a/pages/common/zlib-flate.md b/pages/common/zlib-flate.md index 43b99d6d86..9aab7d4f8f 100644 --- a/pages/common/zlib-flate.md +++ b/pages/common/zlib-flate.md @@ -6,12 +6,12 @@ - Compress a file: -`zlib-flate -compress < {{path/to/input_file}} > {{path/to/compressed.zlib}}` +`zlib-flate < {{path/to/input_file}} -compress > {{path/to/compressed.zlib}}` - Uncompress a file: -`zlib-flate -uncompress < {{path/to/compressed.zlib}} > {{path/to/output_file}}` +`zlib-flate < {{path/to/compressed.zlib}} -uncompress > {{path/to/output_file}}` - Compress a file with a specified compression level. 0=Fastest (Worst), 9=Slowest (Best): -`zlib-flate -compress={{compression_level}} < {{path/to/input_file}} > {{path/to/compressed.zlib}}` +`zlib-flate < {{path/to/input_file}} -compress={{compression_level}} > {{path/to/compressed.zlib}}` diff --git a/pages/linux/ip-rule.md b/pages/linux/ip-rule.md index c19b715262..eb388789e7 100644 --- a/pages/linux/ip-rule.md +++ b/pages/linux/ip-rule.md @@ -33,4 +33,4 @@ - Restore all rules from a file: -`sudo ip {{[ru|rule]}} {{[r|restore]}} < {{path/to/ip_rules.dat}}` +`sudo ip < {{path/to/ip_rules.dat}} {{[ru|rule]}} {{[r|restore]}}` diff --git a/pages/linux/lxc-profile.md b/pages/linux/lxc-profile.md index aff07ae472..99a300d507 100644 --- a/pages/linux/lxc-profile.md +++ b/pages/linux/lxc-profile.md @@ -17,7 +17,7 @@ - Edit a specific profile importing the configuration values from a file: -`lxc profile edit {{profile_name}} < {{config.yaml}}` +`lxc < {{config.yaml}} profile edit {{profile_name}}` - Launch a new container with specific profiles: diff --git a/pages/linux/sfdisk.md b/pages/linux/sfdisk.md index c6fc12b184..92e21e1bfc 100644 --- a/pages/linux/sfdisk.md +++ b/pages/linux/sfdisk.md @@ -9,7 +9,7 @@ - Restore a partition layout: -`sudo sfdisk {{path/to/device}} < {{path/to/file.dump}}` +`sudo sfdisk < {{path/to/file.dump}} {{path/to/device}}` - Set the type of a partition: diff --git a/pages/linux/sqfstar.md b/pages/linux/sqfstar.md index 1ff283595a..b0cedeb51b 100644 --- a/pages/linux/sqfstar.md +++ b/pages/linux/sqfstar.md @@ -5,7 +5,7 @@ - Create a squashfs filesystem (compressed using `gzip` by default) from an uncompressed tar archive: -`sqfstar {{filesystem.squashfs}} < {{archive.tar}}` +`sqfstar < {{archive.tar}} {{filesystem.squashfs}}` - Create a squashfs filesystem from a tar archive compressed with `gzip`, and [comp]ress the filesystem using a specific algorithm: