-
3Please, don't post images of text. – Kusalananda Oct 08 '17 at 06:37
-
If you're happy with one or several of the answers, upvote them. If one is solving your issue, accepting it would be the best way of saying "Thank You!" :-) – Kusalananda Oct 08 '17 at 07:28
2 Answers
cat<tmp.1|wc>tmp.3
This is the same as
wc <tmp.1 >tmp3
It will count the number of words, lines and bytes in tmp.1
and write the result to tmp.3
. This command line produces no output on the terminal when run in this way.
The other output saying Done
is from an earlier invocation of ls
that was run as a background job (started as ls ... &
). That job finished just as you ran the wc
command, and the shell reported that it had done so.
Judging from this question and from your previous question, you seem to run odd commands as background jobs. Don't do that. Simply don't run commands with &
appended to the end if you don't need to run them as asynchronous processes.
Look for a tutorial on-line that explains job control in bash
, or read the job-control questions here.

- 333,661
cat<tmp.1|wc>tmp.3
This counts the bytes in tmp.1
, writing the result into tmp.3
and printing nothing. It is equivalent to
wc <tmp.1 >tmp.3
or
<tmp.1 wc >tmp.3
The output that you see printed, that is:
[3] Done ls --color=auto -al | wc
is the shell telling you that a previous command you had run in the background (with &
) has completed.

- 8,193