Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Are you trying to capture the output of the shell script as a text to be stored in variable? (Or instead gathering the numerical exit status which the shell assigns to $? ) Commented Sep 12, 2024 at 13:35
  • 3
    The reason for the limitation is that "Shell Script Result" defaults to type "File". If you choose type "Number" instead and add echo $? at the end of your script, you can do a numeric comparison (equal, greater than, etc). $? is a variable set by the shell that stores the exit status of the most recently executed command, as mentioned in bmike's comment. Commented Sep 12, 2024 at 13:46
  • 1
    Have you given any thought to using logical AND and logical OR? The basic syntax would look like this -> print foo && print success || print failure. Commented Sep 12, 2024 at 15:43