edit_script

Output of --help=edit_script

The following help text is generated by ecflow_client --help=edit_script

edit_script
-----------

Allows user to edit, pre-process and submit the script.
Will allow pre-processing of arbitrary file with 'pre_process_file' option

Argument(s):

    path to task
        # The path to the task/alias

    action: [ edit | pre_process | submit | pre_process_file | submit_file ]
        # edit : Returns the script file to standard out. The script will
        # include used variables enclosed between %comment/%end at the
        # start of the file
        #
        # pre_process: Returns the script file to standard out. The script will
        # include used variables enclosed between %comment/%end at the
        # start of the file and with all %include expanded
        #
        # submit: Extracts the used variables from the supplied file, i.e
        # between the %comment/%end and use these them to generate the
        # job using the ecf file accessible from the server
        #
        # pre_process_file: Pre-process the user supplied file,
        # expanding includes, performing variable substitution,
        # removing manual & comment sections.
        #
        # submit_file: Like submit, but the supplied file is submitted by the server.
        #
        # Options `pre_process_file` and `submit_file` facilitate debugging the script file

    path_to_script_file: (optional)
        # The path to the script file
        # Required for options `pre_process_file` and `submit_file`

    create_alias: (optional)
        # If specified, will create an alias for the task and submit the job using this alias
        # Default value is false, to be used in combination with `submit_file` option

    no_run: (optional)
        # If specified, will create an alias for the task but will not submit the job
        # Default value is false, to be used in combination with `submit_file` option

Usage:

    --edit_script=/path/to/task edit > script_file
       server returns script with the used variables to standard out
       The user can choose to edit this file

    --edit_script=/path/to/task pre_process > pre_processed_script_file
      server will pre process the ecf file accessible from the server
      (i.e expand all %includes) and return the file to standard out

    --edit_script=/path/to/task submit script_file
      Will extract the used variables in the 'script_file' and will uses these
      variables during variable substitution of the ecf file accessible by the
      server. This is then submitted as a job

    --edit_script=/path/to/task pre_process_file file_to_pre_process
      The server will pre-process the user supplied file and return the contents
      to standard out. This pre-processing is the same as job file processing,
      but on a arbitrary file

    --edit_script=/path/to/task submit_file file_to_submit
      Will extract the used variables in the 'file_to_submit' and will uses these
      variables during variable substitution, the file is then submitted for job
      generation by the server

    --edit_script=/path/to/task submit_file file_to_submit create_alias
      Like the the previous example but will create and run as an alias

The client considers, for both user and task commands, the following environment variables:

  ECF_HOST <string> [mandatory*]
    The main server hostname; default value is 'localhost'
  ECF_PORT <int> [mandatory*]
    The main server port; default value is '3141'
  ECF_SSL <any> [optional*]
    Enable secure communication between client and server.
  ECF_HOSTFILE <string> [optional]
    File that lists alternate hosts to try, if connection to main host fails
  ECF_HOSTFILE_POLICY <string> [optional]
    The policy ('task' or 'all') to define which commands consider using alternate hosts.

The options marked with (*) must be specified in order for the client to communicate
with the server, either by setting the environment variables or by specifying the
command line options.

See also

Protocol reference for EditScriptCmd — the request/reply payloads exchanged with the server and the C++ command class that implements this command.