Vasilii Kolobkov on Nostr: POSIX shell puzzle: umask 1; { umask 2; }; umask umask 1; { umask 2; } | .; umask Why ...
POSIX shell puzzle:
umask 1; { umask 2; }; umask
umask 1; { umask 2; } | .; umask
Why on this wretched earth does the second line produces 1!? Any ideas?
Published at
2023-12-30 06:36:50Event JSON
{
"id": "15df2cba161b9dee90a0368f17846ea5e38bb2fbaad7b822095625b66dae858c",
"pubkey": "72c6e70b8564c6cc961a66b3e1dc0195752997c94701b5795f645609509e778c",
"created_at": 1703918210,
"kind": 1,
"tags": [
[
"proxy",
"https://chaos.social/users/polezaivsani/statuses/111667983849892077",
"activitypub"
]
],
"content": "POSIX shell puzzle:\numask 1; { umask 2; }; umask\numask 1; { umask 2; } | .; umask\n\nWhy on this wretched earth does the second line produces 1!? Any ideas?",
"sig": "e0e0a0a68b4eaf4dda32bad448127486614aa7c7c3601657cdb3d1f79483fc6e29a763a8d3e1133136a49c67a75d9965d9074e09fa2e3d5915fbdaf5e206a846"
}