fix: truncate filenames after 128 bytes.
This commit is contained in:
parent
7ed8fd5182
commit
5d8a6a73ae
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ main() {
|
|||
f="$(echo "$line" | awk -F$SEP "{print \$$c}")"
|
||||
[ -z "$f" ] && continue
|
||||
if [ "$filename" = '' ]; then
|
||||
filename="$(echo "$f" | tr '[:upper:]' '[:lower:]' | sed -e 's/ /-/g' -e 's/[^a-z0-9-]//g')"
|
||||
filename="$(echo "$f" | tr '[:upper:]' '[:lower:]' | sed -E -e 's/ /-/g' -e 's/[^a-z0-9-]//g' -n -e 's/^(.{0,128}).*$/\1/p')"
|
||||
fi
|
||||
echo "$f" > "$filename.$i.md"
|
||||
i=$((i+1))
|
||||
|
|
Loading…
Add table
Reference in a new issue