Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Strange escaped < > behaviour



Hi,

We have a bunch of scripts that work on KSH and PDKSH like this:

echo '        ULOGPFX        = "<WORK_DIR>/ULOG"' | sed 's/.*\<\(.*\)\>.*/\1/'
WORK_DIR

Don't ask me why the escaped the < and > above but the scripts have been like this for a LONG LONG time!

Now with ZSH I get this behaviour

echo '        ULOGPFX        = "<WORK_DIR>/ULOG"' | sed 's/.*\<\(.*\)\>.*/\1/'
ULOG

The easy way to fix it is to remove the back slash in front of the < and >

However this is VERY annoying.

Why does the above give us ULOG and why does this differ from the KSH and PDKSH.

Can someone please help me see why ..

Thanks,

Jerry



Messages sorted by: Reverse Date, Date, Thread, Author