controlled environment for regular expressions?

David Benfell benfell at parts-unknown.org
Mon Sep 1 20:41:48 UTC 2014


Hi all,

I am having a major problem with regular expression matching returning
different results when run from a script under cron or as a delivery
instruction from postfix rather than from the command line.

I don't even know how to debug this. These are all in scripts and
delivery instructions that I have had working for over a decade. And
when I run them from the command line, they work as expected.

The path for seeking executables should not be at issue. I use the
PATH variable in my crontabs and set it to the same PATH as at a
terminal.

I have encountered this problem with both grep and GNU sed (gsed, from
the port).

This is all stuff that worked until recently, and worked for years
under Linux. The only change I think I've made is to implement an IPv6
tunnel. I hope, really hope, I can safely say that's irrelevant.

I use zsh, also a choice that's over a decade old, for both my command
line and to run scripts.

I've never liked regular expressions. I think they are an awful
kludge. But unfortunately, a major part of my workflow depends on them
working correctly and *predictably*.

Has anyone else encountered problems with this? How do you fix it?

Thanks!
-- 
David Benfell <benfell at parts-unknown.org>
See https://parts-unknown.org/node/2 if you don't understand the
attachment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20140901/2e71fb71/attachment.sig>


More information about the freebsd-questions mailing list