koha-shellKoha is the first free software library automation package.
RobinSheatCatalyst IThttp://www.catalyst.net.nzAuthorkoha-shell8koha-shellGives you a shell with the user and environment set to make it easy to do koha operations.UNIX/Linuxkoha-shell COMMAND SHELLinstancenameOptionsRun the specified command rather than launching a shell.Show a usage synopsis.Make the shell a login shell.Preserve the current environment (note that if you run it through 'sudo', this may not work as you'd expect.)Run the specified shell. The default is the shell of the current environment, followed by /bin/sh.Show the command that is going to be run.DescriptionThis launches a shell with the user and required environment variables set in such a way that running any Koha commands will
work correctly. With the use of '-c', it can be used to easily run commands in the correct environment.It behaves mostly as a wrapper for su(1), so a deeper discussion of the options can be found in there.Examples
To get a shell:
$ sudo koha-shell library
To run a command:
$ sudo koha-shell -c "/usr/share/koha/bin/migration_tools/bulkmarcimport.pl -b -file data.marc" librarySee alsokoha-foreach(8)su(1)