[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Be nice if you guys could explain what the \<newline> sequence is.
From: |
Bob Proulx |
Subject: |
Re: Be nice if you guys could explain what the \<newline> sequence is. |
Date: |
Sun, 10 Jul 2005 08:41:22 -0600 |
User-agent: |
Mutt/1.5.9i |
Please keep responses to the entire group and not to me privately.
This is so that everyone can share in the discussion.
Xeno Campanoli wrote:
> First of all, I fixed my problem with tr, which was also a man page problem,
> but I figured it out from an example on the WEB. I guess you can't depend
> on man pages as much anymore because the WEB is what people really look at,
> but it would sure be nice.
The complete manual is available as info documentation. The current
states the following in the man page:
The full documentation for sed is maintained as a Texinfo manual. If
the info and sed programs are properly installed at your site, the
command
info sed
should give you access to the complete manual.
I believe your request is already handled by the info documentation.
> Anyway, sorry if I misstated my problem. Below is what I found. I presume
> I should have been able to use the sed "y" command to do the same as tr did
> (I was trying to remove newlines, which is addressed under miscellaneous
> notes below). The version I got from sed -v was 3.02, and here is the man
> page bottom:
Okay. But 'sed' 3 is rather old. Please consider upgrading. The
current version is 4.1.4 available here:
http://ftp.gnu.org/gnu/sed/
Bob
> Miscellaneous notes
> This version of sed supports a \<newline> sequence in all
> regular expressions, the replacement part of a substitute
> (s) command, and in the source and dest parts of a
> transliterate (y) command. The \ is stripped, and the
> newline is kept.
>
> SEE ALSO
> awk(1), ed(1), expr(1), emacs(1), perl(1), tr(1), vi(1),
> regex(5) [well, one ought to be written... XXX], sed.info,
> any of various books on sed, the sed FAQ
> (http://www.dbnet.ece.ntua.gr/~george/sed/sedfaq.html,
> http://www.ptug.org/sed/sedfaq.htm).
>
> BUGS
> E-mail bug reports to address@hidden Be sure to
> include the word ``sed'' somewhere in the ``Subject:''
> field.
>
> GNU Project 1998-05-07 SED(1)
> (END)
>
> -----Original Message-----
> From: Bob Proulx [mailto:address@hidden
> Sent: Saturday, July 09, 2005 8:57 AM
> To: Xeno Campanoli
> Cc: address@hidden
> Subject: Re: Be nice if you guys could explain what the \<newline> sequence
> is.
>
> Xeno Campanoli wrote:
> > I can't guess for the life of me. I've tried everything I can think of
> that
> > you might possibly mean. Please see the man sed page.
>
> For what version of sed? Please say the version of the sed manual
> that you are looking at and repeat the text from the manual that is
> unclear.
>
> I looked at the manual on my Debian distribution:
>
> NAME
> sed - manual page for sed version 4.1.3
>
> Then I looked at every reference to newline in the manual. I did not
> see anything that matched \<newline> anywhere in the manual.
> Therefore I am guessing this is some formatting problem with your
> version of the manual.
>
> In any case, a newline sequence is:
>
> Oct Dec Hex Char
> ----------------------
> 012 10 0A LF '\n'
>
> That is the character that separates lines in files.
>
> Bob