6 Comments

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.

Expand full comment
author

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.

Expand full comment

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?

Expand full comment
author

No. You read from the standard input. In python that would be sys.stdin in C you would read from the file handle stdin.

Expand full comment
Aug 20, 2023Liked by John Crickett

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!

Expand full comment
author

Yes

Expand full comment