# koha-foreach

koha-foreach

8

koha-foreach

Run a command for each Koha instance. Takes the same arguments as koha-list.

UNIX/Linux

          koha-foreach --chdir --enabled --email|--noemail command

### Description

Run a command for each Koha instance. Takes the same arguments as koha-list.

The string "__instancename__" is replaced in the argument list with the name of the Koha instance in each iteration.

### Options

`--chdir`

- This option makes the command jump into the instance's home directory before running the required command. This prevents directory traversal permissions issues.

### See also

- `koha-create-dirs(8)`
- `koha-list(8)`