Sanitize after ascii
and some gymnastics around newlines
This commit is contained in:
parent
6d9321319b
commit
01a7518b4b
@ -55,11 +55,13 @@ getDestFile() {
|
||||
destfile="${filename##*/}"
|
||||
destfile="${destfile%.*}"
|
||||
fi
|
||||
destfile=$(sanitizeFile "$destfile")
|
||||
destfile=${destfile//$'\n'/::AtOM:NewLine:SQL:Inline::}
|
||||
if (( ${destinationascii["$destination"]} ))
|
||||
then
|
||||
destfile=${destfile//$'\n'/::AtOM:NewLine:SQL:Inline::}
|
||||
echo "$destfile" >&${toascii[1]}
|
||||
read -r -u${toascii[0]} destfile
|
||||
destfile=${destfile//::AtOM:NewLine:SQL:Inline::/$'\n'}
|
||||
fi
|
||||
destfile=$(sanitizeFile "$destfile")
|
||||
destfile=${destfile//$'\n'/::AtOM:NewLine:SQL:Inline::}
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ sanitizeFile() {
|
||||
string=${string/#+(.)/}
|
||||
string=${string/%+(.)/}
|
||||
fi
|
||||
|
||||
# We can't have newlines either
|
||||
string=${string//$'\n'/ }
|
||||
fi
|
||||
echo "$string"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user