0

If I do:

$ curl https://en.wikipedia.org/wiki/CURL | less

I see the contents of that Wikipedia page's html. But, if I do:

$ curl https://en.wikipedia.org/wiki/CURL | echo

all I see is:

% Total % Received % Xferd Average Speed Time Time Time Current
 Dload Upload Total Spent Left Speed
7 59808 7 4729 0 0 13793 0 0:00:04 --:--:-- 0:00:04 13787
curl: (23) Failed writing body (667 != 1300)

I tried using the solution from here, but after doing:

$ curl https://en.wikipedia.org/wiki/CURL | tac | tac |echo

I see:

 % Total % Received % Xferd Average Speed Time Time Time Current
 Dload Upload Total Spent Left Speed
100 59808 100 59808 0 0 144k 0 --:--:-- --:--:-- --:--:-- 144k

Which is progress because there is no Failed writing body , but it still doesn't give me what I want (to echo the html of that Wikipedia page).

So, how can I echo the output of curl?

asked Mar 6, 2018 at 2:43
0

1 Answer 1

2

I think you mean to pipe into cat, not echo. echo doesn't take input from stdin. It only echos its arguments.

answered Mar 6, 2018 at 2:47
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.