From 2d110a18248b0722a3cee4d9592184781731d4e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Caro?= Date: Thu, 15 Oct 2015 11:34:38 +0200 Subject: [PATCH] Update readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index db1caf8..9df1e0d 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,15 @@ Just add `{:sshex, "2.0.0"}` to your deps on `mix.exs`. Then assuming `:ssh` application is already started (hence it is listed on deps), you should acquire an SSH connection using `:ssh.connect/4` like this: ```elixir - {:ok, conn} = :ssh.connect('123.123.123.123', 22, - [ {:user,'myuser'}, {:silently_accept_hosts, true} ], 5000) +{:ok, conn} = :ssh.connect('123.123.123.123', 22, + [ {:user,'myuser'}, {:silently_accept_hosts, true} ], 5000) ``` Then you can use the acquired `conn` with the `cmd!/4` helper like this: ```elixir - SSHEx.cmd! conn, 'mkdir -p /path/to/newdir' - res = SSHEx.cmd! conn, 'ls /some/path' +SSHEx.cmd! conn, 'mkdir -p /path/to/newdir' +res = SSHEx.cmd! conn, 'ls /some/path' ``` This is meant to run commands which you don't care about the return code. `cmd!/3` will return the output of the command only, and __will raise any errors__. If you want to check the status code, and control errors too, you can use `run/3` like this: