🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #6460

Re: script sobre dmesg

#6460
From: Luis Angel Fdez. Fdez.
Date: Thu, 26 Jun 2003 10:53
55 lines
2370 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

	A las 09:39 del jueves 26 de junio, 
	Pacolinx <pacolinux@QUITAMEinicia.com> 
	hablando de script sobre dmesg 
	en es.comp.os.linux.programacion dijo...

  Hola

  Veamos, a mi se me ocurre...

> #!/bin/bash
> f=/root/temp.txt
> dmesg > $f

  Cambiar estas dos l�neas que siguen...
  
> i=0
> awk '/status=0x51/ {i=i+1} '  $f

  por... 

    i=`awk 'BEGIN{i=0} /status=0x51/ {i=i+1} END{print $i}'

> if [ i> 0 ]; then

  Y luego el if ser�a...

  if [ $i -gt 0 ]; then

  Se te hab�a olvidado poner el '$', en cuanto a lo de usar > en
  lugar de -gt pues eso ya no se... a mi me gusta lo de usar -gt.

>                echo Error de dma 
>                hdparm -d0 /dev/hda
> fi
> 
> rm -f $f

  Espero que te sirva. Ta llueu.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE++tCP/gMpgFpBRbwRApwiAKC8zzbDcSWXqSMF1NXdEhaxaWtZvACdGRte
+IAgNJ5EVIHeo3tkKCRvkJU=
=ityC
-----END PGP SIGNATURE-----

-- 
Slackware 9.0.0 AMD Athlon(tm) Processor 598.844MHz
Kernel 2.4.20 Linux User #99754
up 19:45, 3 users, load average: 0.05, 0.13, 0.17
http://muxin.yi.org/~koxo/ http://muxin.no-ip.org/~koxo/
Technical Details
Message-ID: <slrnbflk4b.6ud.koxo@muxin.koxo.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!fu-berlin.de!nsnmpen1-lo.nuria.telefonica-data.net!nsnmpen2-lo.nuria.telefonica-data.net!muxin.koxo.net!news
References: <ejrqs-u63.ln1@paco.aldarias.org>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,f984cdfccfbdd20
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-06-26 03:55:44 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!fu-berlin.de!nsnmpen1-lo.nuria.telefonica-data.net!nsnmpen2-lo.nuria.telefonica-data.net!muxin.koxo.net!news
From: "Luis Angel Fdez. Fdez." <koxo@muxin.yi.org>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: script sobre dmesg
Date: Thu, 26 Jun 2003 12:53:03 +0200
Organization: Telefonica Data Espagna
Lines: 55
Message-ID: <slrnbflk4b.6ud.koxo@muxin.koxo.net>
References: <ejrqs-u63.ln1@paco.aldarias.org>
Reply-To: koxo@telefonica.net
NNTP-Posting-Host: 178.red-80-34-249.pooles.rima-tde.net
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8bit
X-Trace: nsnmpen2-gest.nuria.telefonica-data.net 1056624943 20363 80.34.249.178 (26 Jun 2003 10:55:43 GMT)
X-Complaints-To: usenet@nsnmpen2-gest.nuria.telefonica-data.net
NNTP-Posting-Date: Thu, 26 Jun 2003 10:55:43 +0000 (UTC)
User-Agent: slrn/0.9.7.4 (Linux)