BobGuest
How can I call OS commands from kdb+?
Hi Bob,
Anything entered after a slash \ is first checked to see if its a kdb command, if not it is then ran as a console command. Notice below I run two dos commands (cd and echo) but the last \p call is in faact a kdb command to get/set the port.
`
q)\cd
“C:\\Users\\admin”
q)\echo “test”
“\”test\” ”
q)\p
0
q)\p 5000
q)\p
5000`
Alternatively you can make the same calls using a system format:
`q)system “cd”
“C:\\Users\\admin”
q)system “echo 12”
“12 ”
q)system “p”
5000`
All kdb’s internal commands are one letter so overlap isn’t usually an issue.
– Ryan