aclient(1)

NAME
acl (done) A standard Client
                    (Rev. 05-March-2010)

SYNTAX
aclient [-%] [-b blocksize] [-bsk socket_size] [-p prompt] host service [-U name] [-Ppassword] [command...]

DESCRIPTION
aclient is a client application of the sk(3) functions. It transmits commands to aserver(1) running the specified service on the specified host, and receives the result.

OPTIONS

-% asks to encode the shell-specific characters < > & ? * [ ] ( ) ; (see also the Escaping conventions below)

-b blocksize defines the size of logical blocks read from the standard input and transferred to the server. The default is 4k.

-bsk socket_size defines the physical size of socket blocks used in data transmission. The default can be specified via the SK_bsk environment variable; if SK_bsk is not defined, the default depends on the socket standards, generally 4K.

-p prompt defines the prompt to be displayed in case of interactive mode. The default is
host/service.

host designates the name of the host where the specified service is available.

service designates the service, either as a name appearing in the /etc/services(5) file, or as a number in the 1024-2047 range. The same service must be used by aserver.

-Uname specifies a name that can be recognized by the Server (see sk(3), authorisation file).

-Ppassword specifies the password associated to the -U name (see sk(3), authorisation file).

command specifies what has to be executed by service at host; a semi-colon (;) may be used as a separate argument to delimit commands. When no command is given as arguments, aclient waits for commands in the standard input.

SENDING OR CAPTURING THE DATA
Data are normally transferred via the standard input and output. A first solution therefore consists in specifying the command for data transfer as options, e.g.

aclient host service_file Write /tmp/copy < myinput

There are redirection possibilities but unlike sh(1) these redirections must be specified before the command. The example above could be executed as:

aclient host service_file
host/service_file> <myinput Write /tmp/copy
host/service_file> ...

Note that file names may be replaced by pipes for names starting with the | character; if blanks are embedded, the command have to be quoted. For instance, to write the list of files to a foreign file: aclient host service_file
host/service_file><"|ls -l" Write /tmp/copy
host/service_file> ...

ESCAPING CONVENTIONS
Since aclient connects to aserver where a shell is executed, a special convention (similar to http queries) is available to escape special characters and define arguments with special characters to the server program. This convention uses %{...} to define parameters with special characters (like blank, asterisks, etc).

ENVIRONMENT VARIABLES
SK_bsk is used by aclient as the default -bsk option.

EXAMPLES

1.  Query a catalog on cocat1:
    aclient cocat1 1660 gsc1.2 -c 123.12-78.12 -r 1.5 -sr

2.  Copy a file to cocat1
    aclient cocat1 1660 save < /etc/passwd
    returns the name of the remote file

3.  List remote files having a name wich contains an asterisk:
    aclient cocat1 1660 ls *%{*}*

4.  Find the star ** STT 82AA' in the last version of edited simbad:
    aclient -% newviz 1660 sim.arg 0 "** STT 82AA'"
    which gives the same result as
    aclient newviz 1660 sim.arg 0 "%** STT 82AA'"

5.  Rewind the tape /dev/nrst0 and get its status on the foreign host using the rtape(4) service.
    aclient foreign rtape setenv TAPE /dev/nrst0 \; mt stat \; mt rew \; mt stat

SEE ALSO
aserver(1) pipe(2) sk(3) services(5)