bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sed


From: Ralf Wildenhues
Subject: Re: sed
Date: Tue, 13 Feb 2007 22:30:54 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Stephane, all,

* Stephane Chazelas wrote on Tue, Feb 13, 2007 at 10:07:36AM CET:
> 
> 1- "echo" is a command to expand the \b, \n, \r... not the
> command to display some text verbatim

Not necessarily.

> echo '\v'
> 
> outputs a vertical tab followed by a line feed.

Not my shell's echo, no.  That outputs backslash v newline.  Not being
able to rely on this is exactly one reason to avoid echo.

> You want the POSIX printf '%s\n' or the ksh/zsh specific print
> -r --.

Yep.  However in the real world (that one that exists next to
standards), existing printf programs can have bugs with long
arguments, or with \045.  If present, printf is certainly
preferable to echo, though.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]