Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

dr.denis's blog

By dr.denis, 10 years ago, translation, In English

Hello everyone!
How do I use the console, run file file.exe with rules. i need rules, where file.exe can only
1) Read from "input.txt"
2) write to "output.txt"

I need it becouse, user can send program with "shoutdoun, or reboot".
If in Windows it is impossible, how to do it on ubuntu

  • Vote: I like it
  • +2
  • Vote: I do not like it

| Write comment?
»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

file <input.txt >output.txt

»
10 years ago, # |
Rev. 2   Vote: I like it +4 Vote: I do not like it

On linux, try this: https://github.com/daveho/EasySandbox

Don't worry about "shoutdoun" command:

shoutdoun

zsh: command not found: shoutdoun

:)

/////

P/S: in ubuntu, user can run shutdown or reboot iff that user has permission (default, just root account has this)

»
10 years ago, # |
  Vote: I like it -14 Vote: I do not like it

You must create a file called "input.txt" and other "output.txt" int the same place that you have the program file.exe. I recommend use ideone.com or compile the program on Sublime Text, even i did not understood your question and my answer may be wrong i just want likes please :D