procmail
[Top] [All Lists]

Re: hex value in condition

1997-08-09 16:33:00
era eriksson <era(_at_)iki(_dot_)fi> wrote:

<snip>
era> Huh? What "appropriate option"? Either you have it, or you don't. It
era> should accept more or less the same kinds of arguments as printf(3).
era> 
era>  $ which printf
era>  /usr/local/contrib/gnu/bin/printf
era> 
era>  $ printf "\x65\x72\x61\n"
era>  era

I tried this in three of my available environments but output was all 
\x65\x72\x61 so I thought there was some option necessary to specify.

<snip>
era> That would be
era> 
era>     sed -e "/$HENSHIN/",'$d'
era> 
era> Anything inside single quotes is passed literally, even double quotes.
era> Anything inside double quotes (and not inside single quotes) is
era> subject to interpolation. Anything not quoted will be broken up into
era> several arguments if it contains whitespace or other characters
era> regarded as separators by the shell (i.e. < > ; etc) and globbed. 
era> man sh

Whmmmmmm. Never thought of such variation:->
| sed -e "/^_* $HENSHIN _*$/",'$d'
succeeded while anything like
| sed -e "/^_* \xca\xd6\xbf\xae _*$/",'$d'
did not.

BTW, could you teach me what this sed script is supposed to do?
| sed -e 's+^- -+-+' \
I browsed sed man page but could not find any clue.

<snip>
era> In Perl, you can say "print unless" or, indeed, "print if (! condition)". 
era> Or you can specify the interval (/regex/ .. eof) instead. Or you can
era> quit when you reach the separator line:
era> 
era>     :0fbw
era>     | perl -pe 'last if /^_* \xca\xd6\xbf\xae _*$/'

I think I go with
| perl -ne 'print unless /^_* \xca\xd6\xbf\xae _*$/..eof'

Thanks
and sorry to others for utillizing bandwidth with topics
not strictly dedicated to the procmail.
_/_/_/      Mitsuru FURUKAWA      _/_/_/
_/_/_/        Tokyo, Japan        _/_/_/
_/_/_/     mailto:furu(_at_)009(_dot_)com    _/_/_/
_/_/_/  http://www.009.com/furu/  _/_/_/

<Prev in Thread] Current Thread [Next in Thread>