def shell(self, irc, msg, args, text):
        """<command to call with any arguments>
        Calls any command available on the system using the shell
        specified by the SHELL environment variable, and returns its
        output.
        Requires owner capability.
        Note that being restricted to owner, this command does not do any
        sanity checking on input/output. So it is up to you to make sure
        you don't run anything that will spamify your channel or that
        will bring your machine to its knees.
        """
        self.log.info('Unix: running command "%s" for %s/%s', text, msg.nick,
                      irc.network)
        try:
            with open(os.devnull) as null:
                inst = subprocess.Popen(text,
                                        shell=True,
                                        stdout=subprocess.PIPE,
                                        stderr=subprocess.PIPE,
                                        stdin=null)
        except __HOLE__ as e:
            irc.error('It seems the shell (%s) was not available (%s)' %
                      (os.getenv('SHELL'), e), Raise=True)
        result = inst.communicate()
        if result[1]: # stderr
            irc.error(' '.join(result[1].decode('utf8').split()))
        if result[0]: # stdout
            response = result[0].decode('utf8').splitlines()
            response = [l for l in response if l]
            irc.replies(response)
dataset/ETHPy150Open ProgVal/Limnoria/plugins/Unix/plugin.py/Unix.shell