On Wed, 2005-07-27 at 15:30 +0300, Silviu Marin-Caea wrote:
> Mai exact rulez un
> 
> java --arguments --etc
> 
> si vreau sa am un java.pid ca sa pot sa
> 
> kill `< /var/run/java.pid`
> 

Nu stiu daca te ajuta, dar: (din ABS guide)

$!
        
        PID (process ID) of last job run in background
        
        LOG=$0.log
        
        COMMAND1="sleep 100"
        
        echo "Logging PIDs background commands for script: $0" >> "$LOG"
        # So they can be monitored, and killed as necessary.
        echo >> "$LOG"
        
        # Logging commands.
        
        echo -n "PID of \"$COMMAND1\":  " >> "$LOG"
        ${COMMAND1} &
        echo $! >> "$LOG"
        # PID of "sleep 100":  1506
        
        # Thank you, Jacques Lederer, for suggesting this.
        
        possibly_hanging_job & { sleep ${TIMEOUT}; eval 'kill -9 $!' &> 
/dev/null; }
        # Forces completion of an ill-behaved program.
        # Useful, for example, in init scripts.
        
        # Thank you, Sylvain Fourmanoit, for this creative use of the "!" 
variable.
        
        
-- 
Kramer



-- 
This message was scanned for spam and viruses by BitDefender.
For more information please visit http://www.bitdefender.com/


--- 
Detalii despre listele noastre de mail: http://www.lug.ro/


Raspunde prin e-mail lui