I read in a textbook that sort command accepts input either from a file named on the command line or from standard input. I know about cat command accepting stdin:
$ cat
stdin
stdin
What can be an example of it with sort command?
I read in a textbook that sort command accepts input either from a file named on the command line or from standard input. I know about cat command accepting stdin:
$ cat
stdin
stdin
What can be an example of it with sort command?
In exactly the same way
More often though, it would be used with a pipe
A use case would be if you wanted to sort output from any given command after a lot of cut, split, whatever.