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?

Sean Letendre
  • 2,623
  • 3
  • 14
  • 32

1 Answers1

2

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

sudo
  • 5,604
  • 5
  • 40
  • 78