]> git.donarmstrong.com Git - mothur.git/blobdiff - systemcommand.cpp
added set.dir command and modified commands to redirect input and output, removed...
[mothur.git] / systemcommand.cpp
index f341d0a03e3d35177895ab49696f7fb4f1f7ad20..489a2f11f7c3a13df14bedf42a05339e86fcaeb2 100644 (file)
@@ -20,7 +20,17 @@ SystemCommand::SystemCommand(string option){
                
                else {
                        if (option == "") { mothurOut("You must enter a command to run."); mothurOutEndLine(); abort = true; }
-                       else { command = option; }
+                       else { 
+                               //check for outputdir and inputdir parameters
+                               int commaPos = option.find_first_of(',');
+                               
+                               //if there is a comma then grab string up to that pos
+                               if (commaPos != option.npos) {
+                                       option = option.substr(0, commaPos);
+                               }
+                       
+                               command = option;
+                       }
                }       
 
        }