i get a list of strings from a system command - as example data:
q)show a:" "vs “a0 b0 c1 d0 e0 g1 h0 i0 ij”
“a0”
“b0”
“c1”
“d0”
“e0”
“g1”
“h0”
“i0”
“ij”
i want to “join where” adjacent lines have first line ending in “1”
q)b:“1”=last each a
q){$[b and not b[x-1];a[x,x+1];enlist a]}each til count a
,“a0”
,“b0”
(“c1”;“d0”)
,“d0”
,“e0”
(“g1”;“h0”)
,“h0”
,“i0”
,“ij”
i think there might be a shorter way using / or variants?