You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 3, 2019. It is now read-only.
Thanks for the patch, it would be a good addition for human-readable filenames. But I think it would have to be a non-default option - it's easier to use the original code with other scripts, since it's easier to parse a number at the end of the filename than in the middle. I'd suggest using getopt to parse parameters, like this script, and adding either --digits=8 or --suffix-format "-%08d.vcf" to the csplit options.
Fair enough -- I didn't see that split.sh was used with other scripts. I've always used basename and cut for this type of parsing in scripts. I find leaving the file extension (which has many other uses) and using my suggested suffix that starts with a "-" is easy to read for humans and to parse for scripts: a little basename ... .vcf here and a cut -d- -f... there and there is a lot one can do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit makes the output files of split.sh end in .vcf and strips any internal ".vcf":
Currently in l0b0/vcard/master, split.sh results in: