Afficher un message
Vieux 04/01/2008, 16h51   #19
Stephane Chazelas
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: adding a word at the end of each line

On Fri, 04 Jan 2008 09:33:13 -0600, Ed Morton wrote:
[...]
>> printf is a standard Unix command so should be in those Unices
>> where /bin/sh is still a
>> non-standard/deprecated/old-fashioned/you-name-it Bourne shell.

>
> Just because printf exists doesn't mean you can't be happy using echo.

[...]

Sure, but you need to beware that echo is unreliable and
unportable. Especially, there's no guarantee of the behavior if
its arguments start with "-" or contain backslash characters.

So I think it's good practice to systematically replace it with
"printf" which doesn't have those issues.

--
Stephane
  Réponse avec citation
 
Page generated in 0,05125 seconds with 9 queries