Files
secondo/Tools/Generators/TPC-H/postgres/rm-lastsep.sh
2026-01-23 17:03:45 +08:00

12 lines
253 B
Bash

#/bin/bash!
#
# removes the last separator '|' of a line
# and creates a copy ending with suffix ".pg"
if [ "$1" == "" ]; then
printf "\n Usage: $0 <filename> removes last | of every line \n\n"
exit 1
fi
cat "$1" | sed 's#|\(.*\)|#|\1#' > "$1.pg"