Herbert Xu wrote:
On Thu, Nov 29, 2007 at 08:32:55AM -0500, Eric Sunshine wrote:
According to the dash manual, within single quotes, all characters are
treated as literals (except single quote), which appears to agree with
POSIX, so the above behavior seems incorrect.
We need a patch for the dash manual :)
Unfortunately according to POSIX we must interpret these escape sequences:
12682 SYNOPSIS
12683 echo [string ...]
12695 The following character sequences shall be recognized
12696 within any of the arguments:
12703 \n Write a <newline>.
Thank you for the response and for pointing out this documentation.
I suggest that you switch over printf for portability. That is,
replace all occurances of
echo "string"
with
printf "%s\n" "string
Unfortunately, in this case, a portability requirement to older
platforms lacking 'printf' negates the viability of such a solution. As
it turns out, however, I was able to resolve the issue by eliminating
the need to emit backslashes, thus altogether side-stepping the problem.
-- ES
-
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html