1 #include "bbstdExecSystemCommand.h"
2 #include "bbstdPackage.h"
3 #include "bbtkInterpreter.h"
8 BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,ExecSystemCommand);
9 BBTK_BLACK_BOX_IMPLEMENTATION(ExecSystemCommand,bbtk::AtomicBlackBox);
11 void ExecSystemCommand::bbUserConstructor()
17 void ExecSystemCommand::DoProcess()
21 pos2 = bbGetInputIn().find(";",pos1);
28 ccommand=bbGetInputIn().substr(pos1,bbGetInputIn().length()-pos1 );
32 ccommand=bbGetInputIn().substr(pos1,pos2-pos1);
34 for (int i=0 ; i < ccommand.length() ; i++)
41 std::cout << "*** Executing system command : '"<<ccommand<<"'"<<std::endl;
42 system ( ccommand.c_str() );
44 pos2 = bbGetInputIn().find(";",pos2+1);
48 char *str = (char*)bbGetInputIn().c_str();
50 pch = strtok (str,";");
53 std::string ccommand(pch);
54 for ( i=0 ; i < ccommand.length() ; i++)
62 // bbtk::Interpreter::mGlobalInterpreter->InterpretLine( ccommand );
63 system ( ccommand.c_str() );
64 pch = strtok (NULL, ";");
66 // bbSetOutputOut( bbGetInputIn() );
71 } // EO namespace bbstd