QuestionQ52Verified/Essential CommandsCopy linkReport a problemAsk AstroTutorSave questionWhen the command echo $ produces 1, which of the following statements is true?AIt is the process ID of the echo command.BIt is the process ID of the current shell.CIt is the exit value of the command executed immediately before echo.DIt is the exit value of the echo command.Show AnswerAnswerExplanationIn POSIX-like shells, $? expands to the exit status of the command executed immediately before it. A displayed value of 1 therefore represents that prior command’s exit value.Show comments2Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion