Hello Bob,

thank you for answer. OK. I've talk with other unix gays and see mistakes in
my tests. The dot is a REGEXP for all sign except(!) newline and the REGEXP
[^.] means every sign except dot.

Now I'm searching for a REGEXP that means all signs (incl. newline). Or what
is the way to turn a datastream with tac?

Winfried


-----Ursprungliche Nachricht-----
Von: Bob Proulx [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 19. Mai 2004 17:08
An: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Betreff: Re: is there a bug in tac when it interpret REGEXP for
separator


[EMAIL PROTECTED] wrote:
> Hallo,

Thank you for your report.  But I had difficulty understanding what
you were intending.  Perhaps others on the mailing list did as well.
Perhaps you could clarify with more information to the mailing list.

> I want to turn round a datastream with tac, not every line but every
> sign.

"every sign"?  Could you provide the output you think you should be
getting in that case as well?

> Now my tests:
>
> [EMAIL PROTECTED]:~/tmp> echo -e "abbc\ndef" | tac -rs \.
>
> fe
> [EMAIL PROTECTED]:~/tmp>
> this ist wrong.

Check your command with echo.  The backslash here is not needed.  It
is not a shell metacharacter and needs no escaping.

  echo tac -rs \.

What is the output of this command?

  echo -e "abbc\ndef" | tac -rs \. | od -c

What output are you expecting?

> [EMAIL PROTECTED]:~/tmp> echo -e "abbc\ndef" | tac -rs \[^.\]
>
> fed
> [EMAIL PROTECTED]:~/tmp>

And again:

  echo -e "abbc\ndef" | tac -rs \[^.\] | od -c

What output are you expecting?

> this is right but I dont understand how tac interpret the REGEXP because
> ^ in grep is to negate . When tac the ^ to interpret as linestart then
> must this also work:
>
> [EMAIL PROTECTED]:~/tmp> echo -e "abbc\ndef" | tac -rs \[.^\]
> abbc
> def
> [EMAIL PROTECTED]:~/tmp>
> it dont work.
>
> [EMAIL PROTECTED]:~/tmp> tac --version
> tac (textutils) 2.1

Your version of texutils is very old.  Perhaps you would consider
updating?

  ftp://ftp.gnu.org/gnu/coreutils/coreutils-5.2.1.tar.gz
  ftp://ftp.gnu.org/gnu/coreutils/coreutils-5.2.1.tar.bz2
  (coreutils is the union of fileutils, textutils, and sh-utils)

Bob




_______________________________________________
Bug-textutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-textutils

Reply via email to