Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

modify a string (queuedefs) 1

Status
Not open for further replies.

cantubas

Programmer
Jan 8, 2004
45
FR
I want to modify the file queuedefs by a script
The string is by example:
"a.8j30n45w"
a: name of the queue
j: max number of jobs (8)
n: nice of jobs (30)
w: max wait for jobs (45)


how can I remplace "8" by "10", "30" by "5"...

 

Sorry for the typo.
For changing the max number of jobs of the at queue:
qd=/usr/lib/cron/queuedefs
cp $qd $qd.$$
sed '/^a/s![0-9][0-9]*j!10j!' $qd.$$ >$qd
rm $qd.$$
For changing the nice value of cron jobs:
sed 's/^c/s![0-9][0-9]*n!30n!'

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top