Advertisement
Guest User

Untitled

a guest
Jan 28th, 2015
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import rdstdin
  2. import os
  3. import strutils
  4.  
  5. proc mainLoop() =
  6. var bye = "Bye bye!"
  7.  
  8. while true:
  9. var input = readLineFromStdin("> ")
  10.  
  11. case input
  12. of "quit":
  13. echo(bye)
  14. break
  15. of "q":
  16. echo(bye)
  17. break
  18. else:
  19. echo(execShellCmd("hdfs dfs -$1" % [input]))
  20.  
  21. mainLoop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement