{"action":"opened","issue":{"url":"https://api.github.com/repos/consolidation-org/Robo/issues/367","repository_url":"https://api.github.com/repos/consolidation-org/Robo","labels_url":"https://api.github.com/repos/consolidation-org/Robo/issues/367/labels{/name}","comments_url":"https://api.github.com/repos/consolidation-org/Robo/issues/367/comments","events_url":"https://api.github.com/repos/consolidation-org/Robo/issues/367/events","html_url":"https://github.com/consolidation-org/Robo/issues/367","id":162195819,"number":367,"title":"How to make ssh accepting pipes (|) and redirects (<)?","user":{"login":"vitalyspirin","id":7786743,"avatar_url":"https://avatars.githubusercontent.com/u/7786743?v=3","gravatar_id":"","url":"https://api.github.com/users/vitalyspirin","html_url":"https://github.com/vitalyspirin","followers_url":"https://api.github.com/users/vitalyspirin/followers","following_url":"https://api.github.com/users/vitalyspirin/following{/other_user}","gists_url":"https://api.github.com/users/vitalyspirin/gists{/gist_id}","starred_url":"https://api.github.com/users/vitalyspirin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitalyspirin/subscriptions","organizations_url":"https://api.github.com/users/vitalyspirin/orgs","repos_url":"https://api.github.com/users/vitalyspirin/repos","events_url":"https://api.github.com/users/vitalyspirin/events{/privacy}","received_events_url":"https://api.github.com/users/vitalyspirin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-24T17:40:19Z","updated_at":"2016-06-24T17:40:19Z","closed_at":null,"body":"How to make ssh to accept input from a file (ex: 'ssh ... < commands.sh') and from previous command through pipe (ex: 'cat commands | ssh ... ')?\r\n\r\nI overloaded \\Robo\\Task\\Remote\\Ssh::sshCommand($command) adding there this chunk of code:\r\n\r\n```php\r\nif (trim($command)[0] == '<') {\r\n    $sshCommand = \"ssh{$sshOptions} {$hostSpec} {$command}\";\r\n} elseif (substr(trim($command), -1) == '|') {\r\n    $sshCommand = \"$command ssh{$sshOptions} {$hostSpec}\";\r\n} else {\r\n    $sshCommand = \"ssh{$sshOptions} {$hostSpec} '{$command}'\";\r\n}\r\n```\r\n\r\nIs there a standard way to do it in Robo?\r\n"}}
{"actor":{"display_login":"vitalyspirin"}}