Skip to content

Instantly share code, notes, and snippets.

@schutt
schutt / cassandra2csv.zsh
Created August 25, 2023 20:32
Cassandra cqlsh query output to CSV
#!/bin/zsh
# Cassandra cqlsh output is pipe delimited, it is useful to directly pipe query results to CSV instead.
if [ -p /dev/stdin ]; then
sed 's/\ //g; /^----.*/d; /^(/d; /^\s*$/d; s/|/,/g;'
else
echo "No input on stdin."
fi
@schutt
schutt / README.md
Last active June 13, 2023 17:50
A tree with links between branches.