[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] bash - ppp0 variabile



> Ciao a tutti :-)
> 
> sto facendo un piccolo script per il firewall e avrei necessita' di 
> assegnare ad una variabile l'ip estratto dall'interfaccia ppp0. Stavo 
> pensando a qualcosa tipo sed.
> 
> Oppure c'e' qualcosa che semplifica?
> 

prova

export PPP0IP=$(ifconfig | grep -1 ppp0 | tail -1 | sed 's/.*r://' | sed 's/ .*$//')

io lo uso regolarmente 

LoSpippolo

Error in UNIVERSE. Please run BIGBANG.EXE.



Reply to: