[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

echo should ignore -e/-E/-n when posixly correct

From: llattanzi+bash
Subject: echo should ignore -e/-E/-n when posixly correct
Date: Mon, 19 Jul 2004 17:48:56 -0700 (PDT)

Configuration Information [Automatically generated, do not change]:
Machine: powerpc
OS: darwin8.0
Compiler: gcc
Compilation CFLAGS: -arch i386 -arch ppc -g -Os -pipe -no-cpp-precomp -arch i386 -arch ppc -pipe -DPROGRAM='bash' -DCONF_HOSTTYPE='powerpc' -DCONF_OSTYPE='darwin8.0' -DCONF_MACHTYPE='powerpc-apple-darwin8.0' -DCONF_VENDOR='apple' -DSHELL -DHAVE_CONFIG_H -DMACOSX -I. -I/SourceCache/bash/bash-32/bash -I/SourceCache/bash/bash-32/bash/include -I/SourceCache/bash/bash-32/bash/lib -arch i386 -arch ppc -g -Os -pipe -no-cpp-precomp -arch i386 -arch ppc -pipe uname output: Darwin stderr.apple.com 8.0.0b1 Darwin Kernel Version 8.0.0b1: Mon Jul 12 21:41:56 PDT 2004; root:xnu/xnu-638.1.obj~4/RELEASE_PPC Power Macintosh powerpc
Machine Type: powerpc-apple-darwin8.0

Bash Version: 2.05b
Patch Level: 0
Release Status: release

        -e -E -n are not standard options

        echo -n -e -E | grep 'n -e -E' && echo PASSED || echo FAILED

Index: bash/bash/builtins/echo.def
diff -u bash/bash/builtins/echo.def: bash/bash/builtins/echo.def:
--- bash/bash/builtins/echo.def: Sat Apr  5 00:00:27 2003
+++ bash/bash/builtins/echo.def Mon Jul 19 17:35:05 2004
@@ -30,6 +30,7 @@

 #include <stdio.h>
 #include "../shell.h"
+extern int posixly_correct;

 $BUILTIN echo
 $FUNCTION echo_builtin
@@ -105,7 +106,7 @@

/* echo - and echo -<nonopt> both mean to just echo the arguments. */
-      if (*temp == 0 || temp[i])
+      if (*temp == 0 || temp[i] || posixly_correct)

       /* All of the options in TEMP are valid options to ECHO.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]