Chris Siebenmann on Nostr: Today's ancient Unix trivia: in the Research Unix V6 shell, 'goto' and 'exit' were ...
Today's ancient Unix trivia: in the Research Unix V6 shell, 'goto' and 'exit' were both external programs. They worked by changing the seek position on the file descriptor of the shell script (which they shared with the shell). This worked because the shell read its input line by line (which actually meant character by character).
Interested parties can read more on the V6 shell's control flow at
https://utcc.utoronto.ca/~cks/space/blog/unix/V6ShellControlFlowPublished at
2023-12-03 18:51:58Event JSON
{
"id": "719a99b89b9a94ce0687e4d666179c5247e4de85183ea332a12030ba2ea9fc4e",
"pubkey": "d22d3e7a3748f64d667c85f6bc02a4e12d1dfdfdcf5b6f2654bf42e847797112",
"created_at": 1701629518,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/cks/statuses/111517992144219398",
"activitypub"
]
],
"content": "Today's ancient Unix trivia: in the Research Unix V6 shell, 'goto' and 'exit' were both external programs. They worked by changing the seek position on the file descriptor of the shell script (which they shared with the shell). This worked because the shell read its input line by line (which actually meant character by character).\n\nInterested parties can read more on the V6 shell's control flow at https://utcc.utoronto.ca/~cks/space/blog/unix/V6ShellControlFlow",
"sig": "ee10445b3e18b42c33eb9c4f6877f7f39f665dd5f7bf302bbb637aa747b0ee69a041a8793026bac2d67ee6cf7818a544030874314325eb85774621efb8c2cb7f"
}