You are not logged in.

#1 2010-11-09 01:27:25

leercrak
Member
Registered: 2010-10-16
Posts: 75

question about command piping and renicing without pid's

i want to have a "script" that would be something like [ sudo pgrep steam.exe | renice 19 ] so that i can use the script for multiple programs without having to do each process manually but just by the process name.ive looked aro8nd for something like this but get stuck at how im supposed to pipe the output to a renice and have it all be with sudo.

Offline

#2 2010-11-09 01:59:40

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: question about command piping and renicing without pid's

don't pipe.

renice 19 $(pgrep steam.exe)

Offline

#3 2010-11-09 02:00:05

leercrak
Member
Registered: 2010-10-16
Posts: 75

Re: question about command piping and renicing without pid's

y ty good sir

Offline

Board footer

Powered by FluxBB