[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [NOVICE] Min Linux kan ikke se netværket



At 08:19 27-09-1999 +0200, you wrote:
> > > cat /proc/net/dev |grep : | cut -d : -f 1 | grep eth0 >/dev/null 2>&1
> > >
> > > if [ $? -eq 0 ] ; then
....
> Og nu virker det. Det kan godt se ud til at testen i if sætningen ikke går
> godt. Hvad betyder
>
>       [ $? -eq 0 ] ;
>
> egentlig?

Det betyder: Hvis status for sidste kommando er 0 (OK), så...

Kommando(erne) før læser filen /proc/net/dev, leder efter kolon, leder
efter første felt før kolon, og til sidste spørges om ordet "eth0" optræder. Hvis ja, sættes status til 0.


Hvad sker der hvis du fjerner dine ekstra linier, rebooter, og så
skriver:

cat /proc/net/dev |grep : | cut -d : -f 1 | grep eth0

Hvis den ikke skriver "eth0" må det have noget at gøre med, at din
driver til eth0 først bliver loaded når du starter ifconfig.

Den skrev ikke noget. Men hvor nødvendige er den if-sætning. Hvad sikrer den mig mod?


Jeg gættede på at jeg bare kunne udkommentere linier, ved at sætte et # først i linien. Er det ikke godt nok?


---


Venlig hilsen / Kind regards

Jens Bang (sslug@sslug)

Freja Data                    Tlf./phone : +45 - 4046 - 3442
Guldbergs Plads 12 1. tv.     Fax        : +45 - 3537 - 7006
DK-2200 København N
Denmark                       Homepage   : www.frejadata.dk



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:57 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *