This content originally appeared on DEV Community and was authored by Query Filter
!/bin/bash
export_zmemo.sh
DELIMITER="¬"
isql -S SERVER -U user -P pass -s"$DELIMITER" -b -w7500 <<EOF
SET NOCOUNT ON
GO
SELECT * FROM ZMemo
GO
EOF | \
awk -F"$DELIMITER" '{
for(i=1; i<=NF; i++) {
gsub(/^[ \t]+|[ \t]+$/, "", $i)
printf "%s%s", $i, (i<NF ? "'"$DELIMITER"'" : "\n")
}
}' | \
grep -v "^$DELIMITER*$"
This content originally appeared on DEV Community and was authored by Query Filter
Query Filter | Sciencx (2025-10-31T23:43:44+00:00) TRIM5. Retrieved from https://www.scien.cx/2025/10/31/trim5/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.