A
A
arlovski2015-05-21 15:52:29
linux
arlovski, 2015-05-21 15:52:29

Bash: is it possible to do this kind of manipulation in one command?

Good afternoon, tell me if it is possible to somehow optimize this with a single command?
Show the contents of a file, copy to another, and show the contents of both files.
$ cat myfile | tee mycopy && cat myfile mycopy
The question has no practical meaning, only theoretical.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Kirill Penzin, 2015-05-21
@kir_vesp

Yes, it is possible, just write this command yourself)

D
Daniil Petrov, 2015-05-21
@sperson

cat a >> b && cat ab

A
abcd0x00, 2015-06-22
@abcd0x00

cat /etc/passwd | tee x - -

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question