begin public cmd, sh use sys use regex: re space = re("{_}") function cmd(command,argv=null) if argv is null a = space.split(command) return sys.cmd(a[0],a[1..]) else return sys.cmd(command,argv) end end function sh(command,m=null) if m is null or not m["capture"] return sys.cmd("sh",["-c",command]) else value = sys.cmd("sh",["-c",command+" > /tmp/f04e3a427dd35c24"]) text = read("/tmp/f04e3a427dd35c24") return table{value=value, text=text} end end end