I need to load a q file with a hardcoded dictionary, insert a key and assign returned value from the dictionary to an environment variable inside a shell script.
This how it would look like in q:
q)\l /home/.../marketconfig.q
q)show marketconfig[`US]
This is kind of the form I need it to be in:
CONFIG=\`q /home/.../marketconfig.q ; show marketconfig[\`US]\`
Thanks for help guys!
test.sh:
test.q:
Output:
Seems to work for me. -1 prints on standard out. 0N! works too.