1 頁 (共 1 頁)

白爛 shell script

發表於 : 08/31/2002 2:57 pm
謝孟叡
請問 shell script 也可以放到 login item 嗎? +_+

我因為看 classic 不順眼隨手畫了個唬爛...
(嘿, 我剛剛放了個不會動的 script 沒人發現嗎 @@ [img]images/smiles/icon_wink.gif[/img]
<BLOCKQUOTE><font size="1" face="XYZ">code:</font><HR><pre>
#!/bin/csh
set output = \
`ps -xwwl nice | grep Resources/TruBlueEnvironment | grep -v grep`
set line = \
`echo "$output" | perl -pe "s/^@//g" | wc | awk '{print $1}'`
set nice = `echo "$output" | awk '{print $6}'`
set pid = `echo "$output" | awk '{print $2}'`
if ( $line == 0 || $nice == 19) then
#echo do nothing: line = $line, nice = $nice
else
#echo renice +19
renice +19 $pid
endif
</pre><HR></BLOCKQUOTE>

[ 09-01-2002: 留言編輯者: 謝孟叡 ]