4 ms·
Bit of pedantry but I don't think traditional unix shell (like this) follows repl model; the shell is not usually doing printing of the result of evaluation. In
by zokier 7mo ago
Bit of pedantry but I don't think traditional unix shell (like this) follows repl model; the shell is not usually doing printing of the result of evaluation. Instead the printing happens more as a side effect of the commands.
- deleted 7mo ago[deleted]
- jermaustin1 7mo agoI remember my first shell programming I ever did was batch in windows back in the 3.11/95 days. The first line was always to turn off echo, and I've always wondered why that was a decision for batch script. Or I'm misremembering. 30 years of separation makes it hard to remember the details.
- enoint 7mo agoEcho in that case prints command lines before executing them. Its analog is `set -x` rather than `echo`.
- skydhash 7mo agoIt’s a shell, not the whole thing. The whole thing is the shell+kernel+programs.
- zokier 7mo agoEven if you view the system as a whole the printing is deeply intertwined with the evaluation, which is very different from repl where eval returns a value and print prints it
- themafia 7mo agoIt prints a prompt.
- zokier 7mo agoThat's not what print in repl means.
- teo_zero 7mo ago> the shell is not usually doing printing of the result of evaluation I always include $? in the prompt, so I guess I can say it does print the result of the evaluation.