Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

split.sh: append .vcf suffix, only, to end of file #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion split.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ set -o errexit -o noclobber -o nounset -o pipefail

for path
do
csplit --elide-empty-files --digits=8 --prefix "$(basename -- "$path")" "$path" $'/^BEGIN:VCARD\r$/' '{*}' >/dev/null
csplit --elide-empty-files --prefix "$(basename -- "$path" .vcf)" --suffix-format "-%08d.vcf" "$path" $'/^BEGIN:VCARD\r$/' '{*}' >/dev/null
done