You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
see 'vlbish --help'for [options] or 'vlbish --usage'for an extended help.
11
+
see `vlbish --help`for [options] or `vlbish --usage`for an extended help.
12
12
As always, anything in`[]` means it's optional.
13
13
14
-
`vlbish` can be scripted. This repository includes [some useful examples](examples/).
15
-
directory directory
14
+
`vlbish` can be scripted. This repository includes some useful examples in the [examples](examples/) directory.
15
+
16
16
17
17
## Options:
18
18
--help show short help
@@ -34,31 +34,56 @@ There are three (3) formats for a line of input:
34
34
35
35
- [`<selection>`] `/ commands`
36
36
37
-
(attempts to) send the VSI/S commands to all machines in <selection> using TCP/IP
37
+
(attempts to) send the VSI/S commands to all machines in \<selection> using TCP/IP. If no selection specified sends the command(s) to the last-used selection (if any).
38
38
39
39
- [`<selection>`] `! shell commands`
40
40
41
-
(attempts to) execute the shell commands on all machines in <selection> using ssh if no selection given uses last-known selection
41
+
(attempts to) execute the shell commands on all machines in \<selection> using ssh. If no selection specified sends the command(s) to the last-known selection (if any).
42
42
43
43
- `commands`
44
44
45
45
if recognized as vlbish built-in command, executes as that, otherwise interpreted as VSI/S and sent to last-known selection using TCP/IP
46
46
47
-
In this version of vlbish it is possible to put multiple 'logical' lines of
48
-
input on one physical line of input (all characters up to and including the
49
-
newline) by separating the logical lines with two or more semicolons:
47
+
`vlbish` remembers/reuses the last-known selection and displays it in the prompt. The selection remains 'active' until it is modified using a version of the syntax which specifies a (new) selection.
48
+
49
+
In this version of vlbish it is possible to put multiple 'logical' lines of input on one physical line of input (all characters up to and including the newline) by separating the logical lines with two or more semicolons:
50
50
51
51
```
52
52
> 0/tstat?;; sleep 2;; 0!uname -a
53
53
```
54
54
55
55
is now interpreted and executed as if three separate lines of input were given: a VSI/S command, a vlbish builtin command and a shell command.
56
56
57
-
vlbish has lots of built-in knowledge to resolve <selection> into user/ip/port tuples. It also connects to the database @JIVE in order to resolve names and associations and equipment types. It is possible to set options in <selection> affecting the execution of <commands> (see below).
57
+
vlbish has lots of built-in knowledge to resolve \<selection> into user/ip/port tuples. It also connects to the database @JIVE in order to resolve names and associations and equipment types. It is possible to set options in \<selection> affecting the execution of \<commands> (see below).
58
58
59
59
60
60
default ports used:
61
61
62
62
`<VSI/S command>` = 2620 [mark5 control port]
63
63
64
64
`<shell command>` = 22 [ssh]
65
+
66
+
67
+
## template commands
68
+
69
+
With the possibility of setting options on hosts, generic scripting becomes possible.
70
+
71
+
Define aliases for two hosts. Both have the same `mtu` option set, but to different values:
72
+
73
+
```bash
74
+
alias sender host1.domain.com:4004,mtu=2500
75
+
alias receiver 192.168.1.2:8008,mtu=9000
76
+
```
77
+
78
+
Suppose the `set_mtu=...` command exists that can be sent to a host to set a specific MTU value, it can now be done for both (or individual) hosts like below; the command engine inside `vlbish` replaces strings of the form `{key}` in the command with the value for that `key` from the options set for a particular host:
79
+
80
+
```basn
81
+
> sender,receiver/set_mtu={mtu}
82
+
```
83
+
84
+
An elaborate use case can be found in the [rdbe_10g_init.scr](examples/rdbe_10g_init.scr) example - using that script several machines can be configured with their respective IP/ethernet configuration.
85
+
86
+
Note that in script files double `{{ ... }}` braces are needed to escape the first level of string substitution.
87
+
Lines in scripts are "template" commands for the script parser inside `vlbish` - arguments can be passed to scripts and strings of the form `{N}` (N is a number >= 0) are replaced by the scripts' arguments, with the first *argument* having index 0.
88
+
89
+
The engine is not yet smart enough to disambiguate between `{N}` and `{key}`
0 commit comments