# How can I make some commands on the Intersystem cache from the shell script?

I want to perform some commands on Intersystem cache from shell script. One solution which I know is through making a config file but the problem is I dont know how to use config file through shell script. Is there any other solution for this...

for example what I have to run on cache is

``````csession instancename
zn "area"
area>D ^%RI
Device:some/device/path
Next: It should take enter
```
```

It is possible (for some operating systems) to run the Cache terminal in batch mode. For example:

``````echo: off
send: SYS<CR>
send: XXX<CR>
echo: on

logfile: Somepath\myFile.log

send: ZN "AREA"
wait for:AREA>

send: D ^%RI
wait for:Device:
send: some/device/path
wait for:Next:
send: <CR>
```
```

This is documented in the Intersystems cache terminal documentation, especially the using terminal in batch mode section and the terminal scripts section.