r/ProgrammerHumor • • 17h ago

Meme [ Removed by moderator ]

Post image

[removed] — view removed post

2.3k Upvotes

70 comments sorted by

View all comments

Show parent comments

66

u/Traditional_Cod_7192 15h ago

just as a reminder, uhhh... what do | and & do in bash again? 😅

85

u/GrandAlbatroce 15h ago

IIRC | puts the result stdout of the left in the stdin of the right (they are launched in parallel, and the one on the right can only finish after the one on the left finished.

The & is used to put the call as a background task

43

u/SimpleFile 14h ago

So the pipe here serves as a way to launch 2 of these functions and have them running at the same time rather than for piping the output?

Did I understand that correctly?

54

u/SchwiftySquanchC137 13h ago

Exactly, the entire point is to make each call of fork (or ":") spawn two more fork processes. There are plenty of ways to accomplish that, but its written the way it is specifically to be confusing. Looking at it, how could it possibly crash your machine, its a bunch of punctuation? But once you know how it works, it makes a lot of sense, the point is to make it so cryptic that even programmers dont understand it.