[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is there a bug in tac when it interpret REGEXP for separator
From: |
Bob Proulx |
Subject: |
Re: is there a bug in tac when it interpret REGEXP for separator |
Date: |
Wed, 19 May 2004 09:08:20 -0600 |
User-agent: |
Mutt/1.3.28i |
address@hidden 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:
>
> address@hidden:~/tmp> echo -e "abbc\ndef" | tac -rs \.
>
> fe
> address@hidden:~/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?
> address@hidden:~/tmp> echo -e "abbc\ndef" | tac -rs \[^.\]
>
> fed
> address@hidden:~/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:
>
> address@hidden:~/tmp> echo -e "abbc\ndef" | tac -rs \[.^\]
> abbc
> def
> address@hidden:~/tmp>
> it dont work.
>
> address@hidden:~/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