The Shell utility

The Shell utility allows you to run arbitrary commands in a host system shell.

Command Description
start-util --type shell --app app_id [--token token] --host host_id [--wd working_dir] --cmd command [args...] Starts a Shell utility with the specified command string. The token is a string. If you do not specify a token, one is generated and returned when you start the utility. The token is used to stop the utility or to get its status. --wd, which is optional, sets the working directory for the process that gets launched. If specified, it must be an absolute path. If wd is not specified, the setting defaults to %ENDECA_CONF%\working\ <appName>\shell on Windows or $ENDECA_CONF/working/ <appName>/shell on UNIX. The --cmd arguments are passed in a single string. If --cmd is omitted, the first unrecognized argument is taken as the start of your command.
stop-util --app app_id --token token Stops a Shell utility. The token is a string, either user-created or generated and returned when you start the utility, that eaccmd prints to screen. The token can be used to stop the utility or to get its status.
status-util --app app_id --token token Gets the status of a Shell utility. The token is a string, either user-created or generated and returned when you start the utility, that eaccmd prints to screen. The token can be used to stop the utility or to get its status.

Shell utility examples

The first example deletes the Dgidx output after it has been copied in a separate action over to the Dgraph:
eaccmd start-util --type shell --app my_wine --host mkt1010
--cmd rm <dgidx-output-dir>/*.*
The second example performs a recursive directory copy:
eaccmd start-util --type shell --app myapp --host hosttorunon
--cmd cp–r /mysourcedir /mydestdir

Troubleshooting the Shell utility

In many cases, particularly cross-platform scenarios, the Shell command must be wrapped in double quotation marks. The error message returned, which occurs at the console level, is usually something similar to the following:
The system cannot find the path specified.