--- qdel.c.orig	2012-08-25 05:42:48.000000000 +0900
+++ qdel.c	2012-09-11 16:53:41.421693654 +0900
@@ -31,6 +31,7 @@
   int any_failed = 0;
   int purge_completed = FALSE;
   int located = FALSE;
+  int tflg = FALSE;
   char *pc;
 
   char job_id[PBS_MAXCLTJOBID]; /* from the command line */
@@ -133,6 +134,7 @@
         snprintf(extend,sizeof(extend),"%s%s",
           ARRAY_RANGE,
           pc);
+        tflg = 1;
 
         break;
 
@@ -209,6 +211,11 @@
     /* check to see if user specified 'all' to delete all jobs */
 
     strcpy(job_id, argv[optind]);
+    /* add [] to job_id if with -t option */
+    if ( tflg != FALSE ) {
+      strcat(job_id, "[]");
+      tflg = FALSE;
+    }
 
     if (get_server(job_id, job_id_out, server_out))
       {
