Index: trunk/ippTasks/detrend.process.pro
===================================================================
--- trunk/ippTasks/detrend.process.pro	(revision 12368)
+++ trunk/ippTasks/detrend.process.pro	(revision 12369)
@@ -165,4 +165,9 @@
     exec mkdir -p $outroot
 
+    $run = detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class_id $CLASS_ID --input_uri $URI --camera $CAMERA $ARGS
+    if ($WORKDIR != NULL)
+      $run = $run --workdir $outroot
+    end
+
     # save the pageName for future reference below
     options $pageName
@@ -170,7 +175,7 @@
     # create example job options as a demonstration
     if ($VERBOSE > 1)
-      echo command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class_id $CLASS_ID --input_uri $URI --camera $CAMERA --workdir $outroot $ARGS
-    end
-    command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class_id $CLASS_ID --input_uri $URI --camera $CAMERA --workdir $outroot $ARGS
+      echo command $run
+    end
+    command $run
   end
 
@@ -282,4 +287,9 @@
     exec mkdir -p $outroot
 
+    $run = detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA $ARGS
+    if ($WORKDIR != NULL)
+      $run = $run --workdir $outroot
+    end
+
     # save the pageName for future reference below
     options $pageName
@@ -287,7 +297,7 @@
     # create example job options as a demonstration
     if ($VERBOSE > 1)
-      echo command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA --workdir $outroot $ARGS
-    end
-    command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA --workdir $outroot $ARGS
+      echo command $run
+    end
+    command $run
   end
 
