🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: script sobre dmesg

#6464
From: J.A. Gutierrez
Date: Thu, 26 Jun 2003 12:43
29 lines
1927 bytes
Pacolinx <pacolinux@quitameinicia.com> wrote:

: cat /etc/init.d/ifhd.sh
: #!/bin/bash

: f=/root/temp.txt
: dmesg > $f
: i=0
: awk '/status=0x51/ {i=i+1} ' $f

: if [ $i -gt 0 ]; then
:          echo Error de dma
:           /root/hd.sh
: fi
: echo No hay error en dma
: rm -f $f


	y no seria mucho mas simple:

#!/bin/sh
dmesg | fgrep -q "status=0x51" && /root/hd.sh || echo "DMA OK"


-- 
finger spd@shiva.cps.unizar.es for PGP      /
.mailcap tip of the day:                   /             La vida es una carcel
application/ms-tnef; cat '%s' > /dev/null /           con las puertas abiertas
text/x-vcard; cat '%s' > /dev/null       /            (A. Calamaro)
Technical Details
Message-ID: <bdepoq$bhj$1@localhost.escomposlinux.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!chi1.webusenet.com!news.webusenet.com!peer02.cox.net!peer01.cox.net!cox.net!news-hub.cableinet.net!blueyonder!marmolejo.escomposlinux.org!not-for-mail
References: <ejrqs-u63.ln1@paco.aldarias.org> <slrnbflk4b.6ud.koxo@muxin.koxo.net> <1t0rs-jk6.ln1@paco.aldarias.org>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f86c8,f984cdfccfbdd20
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-06-26 05:43:08 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!chi1.webusenet.com!news.webusenet.com!peer02.cox.net!peer01.cox.net!cox.net!news-hub.cableinet.net!blueyonder!marmolejo.escomposlinux.org!not-for-mail
From: "J.A. Gutierrez" <spd@daphne.cps.unizar.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: script sobre dmesg
Date: Thu, 26 Jun 2003 12:43:06 +0000 (UTC)
Organization: Rank
Lines: 29
Sender: "J.A. Gutierrez" <spd@shiva.cps.unizar.es>
Message-ID: <bdepoq$bhj$1@localhost.escomposlinux.org>
References: <ejrqs-u63.ln1@paco.aldarias.org> <slrnbflk4b.6ud.koxo@muxin.koxo.net> <1t0rs-jk6.ln1@paco.aldarias.org>
NNTP-Posting-Host: shiva.cps.unizar.es
X-Trace: localhost.escomposlinux.org 1056631386 11827 155.210.152.10 (26 Jun 2003 12:43:06 GMT)
X-Complaints-To: newsmaster@marmolejo.escomposlinux.org
NNTP-Posting-Date: Thu, 26 Jun 2003 12:43:06 +0000 (UTC)
User-Agent: tin/1.4.7-20030322 ("Suggestions") (UNIX) (IRIX64/6.2 (IP19))