Jean-Marc Lasgouttes wrote:
> Stephan> 2. an problem with grep (extended expression syntax)
> 
> The problem is that there is no guarantee that 'egrep' exists, and
> that some systems do not provide 'grep -E' either...
> 
> Autoconf provides a test for that, I'll look whether it is simple
> enough to be duplicated for our needs.

Looking at the tests themselves:

-   grep '\\Declare\(LaTeX\|DocBook\|LinuxDoc\)Class' "$file" \
+   egrep '\\Declare(LaTeX|DocBook|LinuxDoc)Class' "$file" \
    | sed -e 's/^.*\DeclareLaTeXClass *\(.*\)/\1 "false"/' \
          -e 's/^.*\DeclareDocBookClass *\(.*\)/\1 "'$bool_docbook'"/' \
          -e 's/^.*\DeclareLinuxDocClass *\(.*\)/\1 "'$bool_linuxdoc'"/' \

there's no need for the grep call at all. Just pass "$file" to sed.

-- 
Angus

Reply via email to