PREV INDEX NEXT

Author: Unknown
Subject: status var and cd
Date: Thursday, 19 Nov 2020, 21:54:52

Can you give an example of a command where "printenv ?" would not print 0? I am not able to think of one that isn't very basic. Also why does "non_existent_file | printenv ?" print a 0? shouldn't it print the status returned from the process that called  non_existent_file?

Also, in terms of the built-in commands description on the spec, does this mean that a built in command must be on its own line with nothing else in it (subcmd, pipeline, etc.)?
PREV INDEX NEXT