I am reading a Linux book which gives the following example command
ls | diff /dev/fd/0 oldfilelist
It apparently will compare the output of ls to that stored in oldfilelist. I understand that /dev/fd/0 is stdout, but I don't quite understand how it ties in with the use of the pipe.
1) Can someone please clarify how this is working?
2) When I type
I get a single > prompt. I have tried to find out what this means/what is happening but have failed. Can someone also clarify this please?