[FFmpeg-cvslog] r20397 - trunk/configure
Michael Kostylev
michael.kostylev
Thu Oct 29 13:26:45 CET 2009
On Thu Oct 29 11:46:57 2009
M?ns Rullg?rd wrote:
>>>>>>> config.mak generated with bash:
>>>>>>> CCDEP=$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\\\\," -e "1!s,^.*: , ," > $(@:.o=.d
>>>>>>>
>>>>>>> config.mak generated with POSIX sh:
>>>>>>> CCDEP=$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)
>>>>>>
>>>>>> Which shell did that?
>>>>>
>>>>> The latter? dash, mksh in POSIX mode, Solaris sh.
>>>>
>>>> I'm curious. Can you try to find a simple test demonstrating the
>>>> difference?
>>>
>>> TEST_STRING='\\'
>>> echo $TEST_STRING
>>> printf '%s\n' $TEST_STRING
>>
>> echo(){
>> printf "%s\n" "$@"
>> }
>> seems to be portable enough.
>
> Are you saying some idiotic shell applies an extra pass of quote
> removal on arguments to "echo" but not other commands?
I'm saying that builtin echo is unportable.
\$ is an invalid backslash sequence for echo, so it's always untouched.
\\ is a valid sequence, it may be processed or may not, this depends
on shell.
The behaviour of printf is standardized. At least it is perfectly known
where printf must process backslashes and where not.
Michael
More information about the ffmpeg-cvslog
mailing list