Skip to content

Commit

Permalink
updating gh-pages repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Hsin Yuan Yeh authored and Hsin Yuan Yeh committed Nov 4, 2023
1 parent cb1b398 commit ee21bb2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion v2/examples/ex-df.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import tabulate
print(tabulate.tabulate(rows,['Status','Partition','Use Percent']))
```

#### execution examples
#### Executing
```
# localhost
$sshscript check.disk.space.spy
Expand Down
6 changes: 6 additions & 0 deletions v2/examples/ex-ping.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ You want to regularly check the connection states from group A to B.
This example shows how to connect to all servers in group A and execute the "ping" command to database server B.

```
## filename: example-ping.spy
databaseServer = '192.168.1.100'
## suppose they share the same credentials
username = 'user'
Expand All @@ -26,3 +27,8 @@ for account,password in group:
avg = sum(times)/len(times) if len(times) else 0
states[account] = time / received if received else 0
```

#### Executing
```
$sshscript example-ping.spy
```

0 comments on commit ee21bb2

Please sign in to comment.