mirror of
https://github.com/tldr-pages/tldr
synced 2026-08-26 14:13:36 +01:00
lwp-request, ncat: reorder input redirect; read: use cat instead (#19916)
Co-authored-by: Ivan Baluta <ivanbaluta.dev@gmail.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
- Upload a file with a POST request:
|
||||
|
||||
`lwp-request -m POST {{http://example.com/some/path}} < {{path/to/file}}`
|
||||
`lwp-request < {{path/to/file}} -m POST {{http://example.com/some/path}}`
|
||||
|
||||
- Make a request with a custom user agent:
|
||||
|
||||
|
||||
@@ -33,4 +33,4 @@
|
||||
|
||||
- Read `stdin` and perform an action on every line:
|
||||
|
||||
`while read line; do {{echo|ls|rm|...}} "$line"; done < {{/dev/stdin|path/to/file|...}}`
|
||||
`cat {{/dev/stdin|path/to/file|...}} | while read line; do {{echo|ls|rm|...}} "$line"; done`
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
- Write output of specified file to the specified host on the specified port:
|
||||
|
||||
`ncat {{address}} {{port}} < {{path/to/file}}`
|
||||
`ncat < {{path/to/file}} {{address}} {{port}}`
|
||||
|
||||
- Accept multiple incoming connections on an encrypted channel evading detection of traffic content:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user