grep-2.5.4 test script foad1.sh fix on Solaris 10

View: New views
1 Messages — Rating Filter:   Alert me  

grep-2.5.4 test script foad1.sh fix on Solaris 10

by Sum Wu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi bug-grep,

The test script foad1.sh fails on Solaris 10. Solaris does not have "-n"
option for echo command. It could be fixed by:


--- foad1.sh.FCS        Sun Sep  6 01:02:32 2009
+++ foad1.sh    Sun Sep  6 01:19:47 2009
@@ -23,7 +23,7 @@
   INPUT="$1"
   EXPECT="$2"
   shift 2
-  OUTPUT=`echo -n "$INPUT" | tr "/" "\n" | "$GREP" "$@" | tr "\n" "/"`
+  OUTPUT=`echo "$INPUT\c" | tr "/" "\n" | "$GREP" "$@" | tr "\n" "/"`
   if test "$OUTPUT" != "$EXPECT" || test "$VERBOSE" = "1"; then
     echo "Testing:  $GREP $@"
     test "$LC_ALL" != C && test "$LC_ALL" != "" && echo "  LC_ALL: \"$LC_ALL\""


Thanks,

-- Sum