public
Description: personal scripts
Homepage:
Clone URL: git://github.com/mackstann/bin.git
bin / DoItEasy
100755 16 lines (9 sloc) 0.447 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/zsh
 
# Written by Nick Welch <nick@incise.org>. Author disclaims copyright.
 
# DoItEasy: run a command with the lowest cpu and i/o priorities. requires
# sudo-ing to root to get the lowest i/o priority, but drops privileges to run
# the command
 
# see also: TakeItEasy
 
# due to inadequate word quoting behavior of bash, zsh is required for the
# arguments to be properly passed through
 
exec sudo nice -n 20 ionice -c3 sudo -u $USER $@