Project

General

Profile

« Previous | Next » 

Revision 9303

bugfix: lib/sh/util.sh: repeat(): need to use %s instead of %q (escaped string) in printf

View differences:

util.sh
123 123
repeat() # usage: str=... n=... repeat
124 124
{
125 125
	: "${str?}" "${n:?}"; local n="$n" # will be modified in function
126
	for (( ; n > 0; n-- )); do printf '%q' "$str"; done
126
	for (( ; n > 0; n-- )); do printf '%s' "$str"; done
127 127
}
128 128

  
129 129
sed_ere_flag="$(test "$(uname)" = Darwin && echo E || echo r)"

Also available in: Unified diff