* Frederik Juul Christiani <[EMAIL PROTECTED]> [May 26. 2005 13:40]:
> Sorry for not testing the first patch. I really hope this one
> works.

DOH! That doesn't work either. It creates one parameter for
remind of all the parameters given to rem. remind doesn't like
this.

$ echo | remind - 26 May 2005
No reminders.

vs.

$ echo | remind - "26 May 2005"

REMIND 03.00.22 (English version) Copyright 1992-1998 David F.  Skoll
Copyright 1999-2000 Roaring Penguin Software Inc.
Usage: remind [options] filename [date] [time] [*rep]
<snip>


This is my last attempt. Really. I promise :-)


--- /usr/bin/rem        2005-05-05 10:13:09.000000000 +0200
+++ rem 2005-05-26 15:08:24.408288053 +0200
@@ -21,7 +21,7 @@
 let i=0
 
 # No parameters yet
-PARAMETERS=""
+let j=0
 
 # ------ You shouldn't change anything below this line -----
 
@@ -37,9 +37,21 @@
                -*) OPTIONS[i++]="$1"
                    shift ;;
 
-               *) PARAMETERS=$*
-                  break ;;
+               *) PARAMETERS[j++]="$1"
+                  shift
+                  break;;
        esac
 done
 
-$EXECUTABLE "[EMAIL PROTECTED]" $DEFAULT $PARAMETERS
+while test "$1" != ""
+do
+       PARAMETERS[j++]="$1"
+       shift
+done
+
+if [ "$PARAMETERS" != "" ]; then
+  $EXECUTABLE "[EMAIL PROTECTED]" $DEFAULT "[EMAIL PROTECTED]"
+else
+  $EXECUTABLE "[EMAIL PROTECTED]" $DEFAULT
+fi
+

-- 
Frederik



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to