q icon indicating copy to clipboard operation
q copied to clipboard

Override newline delimiter

Open d10xa opened this issue 6 years ago • 1 comments

echo "x,1;y,2;z,3" | q -d "," "select * from -"

will produce x,1;y,2;z,3

is it possible to perceive another character at the end of the line?

d10xa avatar Mar 01 '19 11:03 d10xa

The solution is not q specific but works in general in UNIX like systems. Just combine with another tool, here tr:

$ echo "x,1;y,2;z,3" | tr ';' '\n' | q -d "," "select * from -"
x,1
y,2
z,3

bitti avatar Mar 01 '19 21:03 bitti