However I have one question, could you please help me figure out what the step 4 is all about? I'm afraid I don't get the idea of that feature exactly.
The Unix command line tools take their input from the standard input if no filename or the filename - is provided. This allows them to be chained together to create more powerful tools.
Hi John, I'm almost done with this project: https://github.com/Ghurtchu/build-your-own-stuff/tree/master/cut
However I have one question, could you please help me figure out what the step 4 is all about? I'm afraid I don't get the idea of that feature exactly.
The Unix command line tools take their input from the standard input if no filename or the filename - is provided. This allows them to be chained together to create more powerful tools.
Ah makes sense, so basically in that case we create this file (raw string) on the fly and give it to the program as CLI argument, right?
No. You read from the standard input. In python that would be sys.stdin in C you would read from the file handle stdin.
Ah yes that's what I mean, we don't really create a file per se, we just pass the raw string from std in, thanks!
Yes