The advantage of FISH is that all it requires on the server-side is an SSH or RSH implementation, Unix shell and a set of standard Unix utilities like ls, cat or dd. Optionally, there can be a special FISH server program (called start_fish_server) on the server, which executes FISH commands instead of Unix shell and thus speeds up operations.
equivalent shell commands,
which may be multi-line
Fish commands are all defined, shell equivalents may vary. Fish commands always have priority: the server is expected to execute a fish command if it understands it. If it does not, however, it can try and execute a shell command. When there is no special server program, Unix shell ignores the fish command as a comment and executes the equivalent shell command(s).
Server replies are multi-line, but always end with
line. ### is a prefix to mark this line, xyz is the return code. Return codes are superset to those used in . The codes 000 and 001 are special, their meaning depends on presence of server output before the end line.
The first two commands sent to the server are FISH and VER to negotiate FISH protocol, its version and extensions.
echo; start_fish_server; echo '### 200'
echo '### 000'
The server may reply to VER command with a lines like
### 200which indicates supported version of the FISH protocol and supported extensions.