IRULE(1)

πŸ“¦ version 5.0.2, in nixos 26.05

✨ IRULE(1) β€” User Commands β€” irule, the iRODS iCommand ✨

🌸 NAME 🌸

irule β€” an iRODS iCommand. iconic, honestly.

πŸ¦‹ SYNOPSIS πŸ¦‹

irule [--available]

πŸ’– DESCRIPTION πŸ’–

Bestie, here are the usage forms, literally exactly as written:

Usage: irule [-v] [-r instanceName] rule inputParam outParamDesc Usage:
irule [-v] [-l] [-r instanceName] -F inputFile [prompt | arg_1 arg_2
...]

The whole point: submit a user defined rule to be executed by an iRODS server. main character energy fr fr.


πŸŽ€ The first form above requires 3 inputs πŸŽ€

  1. rule β€” this is the rule to be executed.
  2. inputParam β€” the input parameters. The input values for the rule is specified here.
    • If there is no input, a string containing "null" must be specified.
    • Multiple input values can be passed by separating them using a %.
    • For example:
irule ... '*x=100%*y="/tempZone/home/public"%*z=string containing spaces' ...
  • Notice that *z is an unquoted string containing whitespace. This only works because the input values are wrapped in single quotes.
  • All values will be passed as strings.
  1. outParamDesc β€” description for the set of output parameters to be returned.
    • If there is no output, a string containing "null" must be specified.

πŸ¦‹ The second form above reads the rule and arguments from the file: inputFile πŸ¦‹

  • The inputFile must be smaller than 1024*20 characters.
  • Arguments following the inputFile are interpreted as input arguments for the rule.
  • These arguments are interpreted in two ways:
    1. The arguments require the "label=value" format.
      • Only named pairs are replaced. Any remaining arguments get their values from the inputFile. All labels start with *.
    2. All arguments can be specified as inputs without any labels.
      • The keyword "default" can be given to use the inputFile value.
      • Use \ as the first letter in an argument as an escape.

🧚 The inputFile should contain 3 parts 🧚

  1. rule definition β€” defined by name and curly braces ({}) block.
  2. INPUT line β€” specifies input arguments as %-separated label=value pairs.
    • Use %% to specify a literal % in an input value.
    • An input value can begin with $. In such a case the user will be prompted. A default value can be listed after the $, as in *A=$40. If prompted, the default value will be used if the user presses return without giving a replacement.
    • The input arguments can be just 'null'.
  3. OUTPUT line β€” specifies output arguments %-separated labels.
    • The built-in variable ruleExecOut stores output from the rule generated by microservices.
    • The output arguments can be just 'null'.

'arg_1' is of the form *arg=value. For example, using *A=$ as one of the arguments in line 2 of the inputFile, irule will prompt for *A or the user can enter it on the command line:

irule -F filename *A=23

(integer parameters can be unquoted)

or:

irule -F filename "*A='/path/of/interest'" *B=24
irule -F filename "*A=\"/path/of/interest\"" *B=24

(string parameters must be quoted) (your shell may require escaping and/or single quotes)

Example rules can be found at: https://github.com/irods/irods_client_icommands/tree/main/test/rules

In either form, the 'rule' that is processed is either a rule name or a rule definition (which may be a complete rule or a subset).

To view the output parameters (outParamDesc), use the -v option.

✨ Options are ✨

  • --string, -s β€” enable string mode. In string mode, all command line input arguments do not need to be quoted and are automatically converted to strings. String mode does not affect input parameter values in rule files.
  • --file, -F β€” read the named inputFile. If the inputFile begins with the prefix "i:", then the file is fetched from an iRODS server. The inputFile must be smaller than 1024*20 characters.
  • --list, -l β€” list file if -F option is used.
  • --verbose, -v β€” verbose.
  • --available, -a β€” list all available rule engine instances.
  • --rule-engine-plugin-instance, -r β€” run rule on the specified rule engine instance.
  • --help, -h β€” this help.

okay bestie, that's the whole irule page πŸ’… source/version check: iRODS Version 5.0.2 and irule iRODS-5.0.2; date: January 1980; manual: IRULE(1), section 1, User Commands. mwah 🫢✨

πŸ“¦ where this page comes from