Advertisement
Guest User

shell

a guest
Apr 23rd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <cstdlib>
  4. int main() {
  5.   std::string line;
  6.   for ( ; ; ) {
  7.     std::cout << "$> ";
  8.     std::getline(std::cin, line);
  9.     if ( line == "end" || std::cin.eof() ) break;
  10.     std::system(line.c_str());
  11.   }
  12.   return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement