Skip to content

Commit 1616b81

Browse files
Managorivanbaluta
andauthored
lwp-request, ncat: reorder input redirect; read: use cat instead (#19916)
Co-authored-by: Ivan Baluta <ivanbaluta.dev@gmail.com>
1 parent 24b47d9 commit 1616b81

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pages/common/lwp-request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
- Upload a file with a POST request:
1212

13-
`lwp-request -m POST {{http://example.com/some/path}} < {{path/to/file}}`
13+
`lwp-request < {{path/to/file}} -m POST {{http://example.com/some/path}}`
1414

1515
- Make a request with a custom user agent:
1616

pages/common/read.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333

3434
- Read `stdin` and perform an action on every line:
3535

36-
`while read line; do {{echo|ls|rm|...}} "$line"; done < {{/dev/stdin|path/to/file|...}}`
36+
`cat {{/dev/stdin|path/to/file|...}} | while read line; do {{echo|ls|rm|...}} "$line"; done`

pages/linux/ncat.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
- Write output of specified file to the specified host on the specified port:
1616

17-
`ncat {{address}} {{port}} < {{path/to/file}}`
17+
`ncat < {{path/to/file}} {{address}} {{port}}`
1818

1919
- Accept multiple incoming connections on an encrypted channel evading detection of traffic content:
2020

0 commit comments

Comments
 (0)