When piping to xxd, why is some text passed through without modification?
up vote
0
down vote
favorite
netstat -lntup |grep 3306
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
mysqld
is running,the first two lines is a prompt ,you would have to be root to see it all.
netstat -lntup |grep 3306 |xxd
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
00000000: 7463 7020 2020 2020 2020 2030 2020 2020 tcp 0
00000010: 2020 3020 3132 372e 302e 302e 313a 3333 0 127.0.0.1:33
00000020: 3036 2020 2020 2020 2020 2020 302e 302e 06 0.0.
00000030: 302e 303a 2a20 2020 2020 2020 2020 2020 0.0:*
00000040: 2020 2020 4c49 5354 454e 2020 2020 2020 LISTEN
00000050: 2d20 2020 2020 2020 2020 2020 2020 2020 -
00000060: 2020 2020 0a
Why the first two lines can't be shown as in binary format?
Why only tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
shown as in binary format?
.
bash binary xxd
add a comment |
up vote
0
down vote
favorite
netstat -lntup |grep 3306
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
mysqld
is running,the first two lines is a prompt ,you would have to be root to see it all.
netstat -lntup |grep 3306 |xxd
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
00000000: 7463 7020 2020 2020 2020 2030 2020 2020 tcp 0
00000010: 2020 3020 3132 372e 302e 302e 313a 3333 0 127.0.0.1:33
00000020: 3036 2020 2020 2020 2020 2020 302e 302e 06 0.0.
00000030: 302e 303a 2a20 2020 2020 2020 2020 2020 0.0:*
00000040: 2020 2020 4c49 5354 454e 2020 2020 2020 LISTEN
00000050: 2d20 2020 2020 2020 2020 2020 2020 2020 -
00000060: 2020 2020 0a
Why the first two lines can't be shown as in binary format?
Why only tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
shown as in binary format?
.
bash binary xxd
To pipe stdout and stderr together on bash, use|&
instead of|
...
– Chris Dodd
Nov 10 at 1:51
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
netstat -lntup |grep 3306
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
mysqld
is running,the first two lines is a prompt ,you would have to be root to see it all.
netstat -lntup |grep 3306 |xxd
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
00000000: 7463 7020 2020 2020 2020 2030 2020 2020 tcp 0
00000010: 2020 3020 3132 372e 302e 302e 313a 3333 0 127.0.0.1:33
00000020: 3036 2020 2020 2020 2020 2020 302e 302e 06 0.0.
00000030: 302e 303a 2a20 2020 2020 2020 2020 2020 0.0:*
00000040: 2020 2020 4c49 5354 454e 2020 2020 2020 LISTEN
00000050: 2d20 2020 2020 2020 2020 2020 2020 2020 -
00000060: 2020 2020 0a
Why the first two lines can't be shown as in binary format?
Why only tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
shown as in binary format?
.
bash binary xxd
netstat -lntup |grep 3306
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
mysqld
is running,the first two lines is a prompt ,you would have to be root to see it all.
netstat -lntup |grep 3306 |xxd
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
00000000: 7463 7020 2020 2020 2020 2030 2020 2020 tcp 0
00000010: 2020 3020 3132 372e 302e 302e 313a 3333 0 127.0.0.1:33
00000020: 3036 2020 2020 2020 2020 2020 302e 302e 06 0.0.
00000030: 302e 303a 2a20 2020 2020 2020 2020 2020 0.0:*
00000040: 2020 2020 4c49 5354 454e 2020 2020 2020 LISTEN
00000050: 2d20 2020 2020 2020 2020 2020 2020 2020 -
00000060: 2020 2020 0a
Why the first two lines can't be shown as in binary format?
Why only tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
shown as in binary format?
.
bash binary xxd
bash binary xxd
edited Nov 10 at 0:18
Charles Duffy
170k24193247
170k24193247
asked Nov 9 at 23:34
scrapy
160217
160217
To pipe stdout and stderr together on bash, use|&
instead of|
...
– Chris Dodd
Nov 10 at 1:51
add a comment |
To pipe stdout and stderr together on bash, use|&
instead of|
...
– Chris Dodd
Nov 10 at 1:51
To pipe stdout and stderr together on bash, use
|&
instead of |
...– Chris Dodd
Nov 10 at 1:51
To pipe stdout and stderr together on bash, use
|&
instead of |
...– Chris Dodd
Nov 10 at 1:51
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
The parenthesized text was written to standard error, not standard output, and so is written directly to the terminal, not the pipe for grep
to pass on to xxd
.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
The parenthesized text was written to standard error, not standard output, and so is written directly to the terminal, not the pipe for grep
to pass on to xxd
.
add a comment |
up vote
2
down vote
accepted
The parenthesized text was written to standard error, not standard output, and so is written directly to the terminal, not the pipe for grep
to pass on to xxd
.
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
The parenthesized text was written to standard error, not standard output, and so is written directly to the terminal, not the pipe for grep
to pass on to xxd
.
The parenthesized text was written to standard error, not standard output, and so is written directly to the terminal, not the pipe for grep
to pass on to xxd
.
answered Nov 9 at 23:43
chepner
240k30229319
240k30229319
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53234596%2fwhen-piping-to-xxd-why-is-some-text-passed-through-without-modification%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
To pipe stdout and stderr together on bash, use
|&
instead of|
...– Chris Dodd
Nov 10 at 1:51