bash programming

Alex A.Papadopoulos at Bradford.ac.uk
Sun May 27 04:01:13 EEST 2001


Hi all!

Logw university policy, prepei ta dialup sessions mou na mhn pernane tis 6 
wres. Opote xrhsimopoiw to at gia na lew sto linux pote na skotwnei to 
process tou wvdial. To problhma einai oti to kill ap'oti kserw douleyei mono 
me PID, kai oxi me process name.

Synepws, otan prokeitai na leipsei kaneis apo to plhktrologio panw apo 12 
wres kai 8elei entwmetaksy na riksei th syndesh - ksanasynde8ei - thn 
ksanariksei - ksanasynde8ei, yparxei ena mikro problhma. Oti dhladh to PID 
tou deyterou wvdial pou 8a treksei meta apo 6 wres den einai gnwsto.

Ara prospa8oume na to ma8oume. Pros to paron katelhksa sthn entolh-makaroni

WVDIAL=`ps | grep wvdial | grep -v pppd | grep -v "grep"`;kill -9 $WVDIAL

h opoia douleyei men, opws katalabainete den einai ka8olou kompsh de.


Prwton, giati an DEN kanw kill -9 me ftynei kai den kanei kill to process?
Dhladh giati den douleyei h entolh kill $WVDIAL ?

Deyteron, yparxei kapoios tropos na apo8hkeysw sto variable pou 8elw mono to 
prwto token tou output tou grep? Twra dhladh h entolh pou trexei einai kati 
tou styl

kill -9 1106 pts/1 00:00:00 wvdial

Mporw na to periorisw ayto se ena pio swsto kill 1106? Dhl. na pairnei mono 
tous prwtous 4 xarakthres apo to output kai na tous apo8hkeyei sto variable, 
oxi olo to output tou grep.

TIA

-A


PS: Se ayta me boh8hse ena online biblio gia shell programming (SAMS teach 
yourself in 24hrs series), opoios endiaferetai as koitaksei sthn 
http://infobase.informit.com/linux/

exei arketa+endiaferonta+free biblia gia newbies



More information about the Linux-greek-users mailing list