*: reorder input redirect (#18571)

This commit is contained in:
Managor
2025-10-09 06:55:58 +03:00
committed by GitHub
parent 04c35ed262
commit 9fefa2ebce
25 changed files with 50 additions and 50 deletions
+1 -1
View File
@@ -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:
+2 -2
View File
@@ -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`
+1 -1
View File
@@ -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}}`
+1 -1
View File
@@ -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}}'`
+5 -5
View File
@@ -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`
+1 -1
View File
@@ -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:
+2 -2
View File
@@ -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:
+2 -2
View File
@@ -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]}}`
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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}}`
+1 -1
View File
@@ -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}}`
+4 -4
View File
@@ -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]}}`
+1 -1
View File
@@ -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}}`
+3 -3
View File
@@ -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`
+3 -3
View File
@@ -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:
+1 -1
View File
@@ -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:
+3 -3
View File
@@ -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}}`
+3 -3
View File
@@ -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:
+1 -1
View File
@@ -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}}"`
+6 -6
View File
@@ -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:]"`
+3 -3
View File
@@ -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}}`
+1 -1
View File
@@ -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]}}`
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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: