Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to run ./a.out, but monitored (using mon) and nice'd to highest priority.

Here are the commands separately:

nice -n -20 /home/pi/a.out   //works fine

mon /home/pi/a.out   //works fine

mon nice -n -20 /home/pi/a.out   //doesn't work!

I get an "unrecognized flag -n" error...

How to do this?

Many thanks in advance,

share|improve this question
1  
It seems that mon considers -n as it's own option. I haven't worked with mon, but try putting the command after mon in '' –  hpn Feb 22 '13 at 10:35
    
@hnik Yes, you're right. I believe mon thinks the -n is for it. Thanks for that. I'll try the quotes. I'll also try back-ticks. –  Eamorr Feb 22 '13 at 10:43
    
@hnik Single quotes works. Thanks! –  Eamorr Feb 22 '13 at 10:45
    
Another variation that will probably work is nice -n -20 mon /home/pi/a.out. In case it isn’t obvious, this differs in effect from what you are trying in that this command will run the mon program at high priority (in addition to your a.out), whereas your command runs mon at default priority, while elevating a.out. –  Scott Feb 22 '13 at 22:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.