On Mon, 2012-05-07 at 20:56 +0430, Yasser Zamani wrote:
> You're right Simon, Unicodes are two fold. And also I don't know if
> 'sed' can edit a binary stream :?

Not safely. Remember, it deals with lines of text - if a stream doesn't
consist of lines of text, the output may not be what you expect.

> However, in computer academic world, streams are bytes even if they
> are not letters e.g. 0x00 and I'm not sure why it's named 'stream
> editor' instead of e.g. 'tsed'(text stream editor).

Actually, I'd say a stream is any source of data that's read
sequentially, rather than in arbitrary order. It could be raw bytes, but
might also be characters, or more complex structures (e.g a stream of
video frames). 

> 
> Actually, that expression which I mentioned is a bit complicated for
> who see 'sed' for first time; however, your one is almost completely
> unknown for me at this time :S but now, I know enugh about 'sed' to
> continue with LFS ;)

It's actually not too bad... it's an example of dealing with multiple
lines. It finds a line containing 'version', puts it to one side, and
then finds the next line containing 'activity'. Having found it, it
joins the two lines together, uses a substitution to re-arrange the
contents of the combined lines, then prints it. See the 'h', 'H', and
'g' commands in the sed man page for details on how that works.

Simon.

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to