https://learninghub.kx.com/forums/topic/joining-strings-kdb
why does joining these 2 strings give unexpected results? -> system"pwd" = and the type is 0h as well -> (system"pwd"),"/xyz.csv" //type of first string is 0h and type of "xyz.csv" is 10h as expected
ss1
May 27, 2025, 8:33am
2
https://code.kx.com/q/ref/system/ "returns the result as a list of character vectors."
Returns a list (0h) of character vectors (10h).
q)type system"ls -l"
0h
q)count system"ls -l"
28
q)type system"pwd"
0h
q)count system"pwd"
1
q)first system"pwd"
"/Users/myuser"
q)type first system"pwd"
10h
q)(first system"pwd"),"/some"
"/Users/myuser/some"
It's joining a list (of lists) to another list (of characters)
q)(system"pwd"),"/xyz.csv"
"/home/rocuinneagain"
"/"
"x"
"y"
"z"
"."
"c"
"s"
"v" To join a list of lists to another list of lists add 'enlist'
q)(system"pwd"),enlist "/xyz.csv"
"/home/rocuinneagain"
"/xyz.csv" To add a list of characters to a list of characters use 'first'
q)(first system"pwd"),"/xyz.csv"
"/home/rocuinneagain/xyz.csv"