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.

Required fields*

5
  • The script gives the above error when it is executed through SM69 whereas when it is executed as './script.sh' it works fine . Is there any other option to remove this error in SM69? Commented Feb 22, 2019 at 8:37
  • Both return statements (return $RC_LOG_ERR and return $SCRIPT_RC) should result in an error "./script.sh: line xy: return: can only `return' from a function or sourced script" when executed as script. Commented Feb 22, 2019 at 8:43
  • @bhavnapatil I don't know how SM69 executes the script or what shell it uses to execute the script. Some shells would probably be ok with executing it as ./script.sh but as I don't even know what SM69 is I can't say anything about it. There is no indication as to what shell is being used here. Commented Feb 22, 2019 at 8:43
  • 1
    @bhavnapatil Also, you should never ever "enable options to remove errors"!! Errors are removed by writing correct code. Commented Feb 22, 2019 at 8:46
  • @Kusalananda Ok got it. Commented Feb 25, 2019 at 6:20