18
rated 0 times
[
18]
[
0]
/ answers: 1 / hits: 17015
/ 1 Year ago, fri, january 13, 2023, 7:03:18
Is there any short way to save the pipe output to the same file that it's processed. For example, this is what I am actually doing
$ cat filename | sort | uniq > result
$ rm -f filename
$ mv result filename
I was wondering if there was a way to do it in just one line (not appending those commands using &&)
This is not the way, but to get an idea
$ cat filename | sort | uniq > filename
More From » command-line