cancel
Showing results for 
Search instead for 
Did you mean: 

Q 4.0 can't have space in command line argument

codh
New Contributor II
opt/sp/qlib/4.0.0u.x86_64/q -args '12 34'
KDB+ 4.0 2021.04.26 Copyright (C) 1993-2021 Kx Systems
l64/ 28()core NONEXPIRE licensed - unsupported

q).z.x
"-args"
"12"
"34"
q).Q.opt .z.x
args| "12" "34"

 This is a behavior change from 3.6, and it seemed to be a bug. There is no easy way to pass command line argument with spaces to Q any more.

1 ACCEPTED SOLUTION

eohara
New Contributor III
New Contributor III

My earlier version of 4.0 handles it differently

 

ubuntu@LPTP630:~$ q -args '12 34'
KDB+ 4.0 2020.05.04 Copyright (C) 1993-2020 Kx Systems
l64/ 8()core 12649MB ubuntu lptp630 127.0.1.1 EXPIRE 2022.09.16 #########@#####.com KXCE #____

q).z.x
"-args"
"12 34"
q).Q.opt .z.x
args| "12 34"

View solution in original post

3 REPLIES 3

eohara
New Contributor III
New Contributor III

My earlier version of 4.0 handles it differently

 

ubuntu@LPTP630:~$ q -args '12 34'
KDB+ 4.0 2020.05.04 Copyright (C) 1993-2020 Kx Systems
l64/ 8()core 12649MB ubuntu lptp630 127.0.1.1 EXPIRE 2022.09.16 #########@#####.com KXCE #____

q).z.x
"-args"
"12 34"
q).Q.opt .z.x
args| "12 34"

codh
New Contributor II

Thank you! 

SJT
Contributor III
Contributor III

As does my later version.

❯ q4.0 -args '12 34'
KDB+ 4.0 2021.11.04 Copyright (C) 1993-2021 Kx Systems
m64/ 12()core 65536MB sjt mackenzie.local 127.0.0.1 ...

q).z.x
"-args"
"12 34"