[x] $? only works as a lone argument to echo but isn't actually interpreted as a variable, e. g. echo "last result: $?" does not actually work, it just prints last result: $? without any change.
[x] Second issue, for some reason when executing minishell from minishell and then exiting the inner minishell, the exit code gets multiplied by 256, e. g. after exiting inner minishell with exit 4, echo $? prints 1024.
[x] $? only works as a lone argument to echo but isn't actually interpreted as a variable, e. g.
echo "last result: $?"
does not actually work, it just printslast result: $?
without any change.[x] Second issue, for some reason when executing minishell from minishell and then exiting the inner minishell, the exit code gets multiplied by 256, e. g. after exiting inner minishell with
exit 4
,echo $?
prints1024
.