πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: ch.comp.os.linux
Article #18126

Re: Problem mit grep-Umleitung in shellscript

#18126
From: Joerg Hau
Date: Wed, 05 Apr 2000 00:00
32 lines
1587 bytes
On Tue, 04 Apr 2000 00:03:42 +0200, Sven Kirmess wrote:
> Joerg Hau wrote:
> 
> > --- snip ---
> > #! /bin/tcsh
> > onintr cleanup
> > set pfile = ("/etc/rc.config")
> >
> > echo "Configuration of "$HOSTNAME", as of "`date`"."
> > echo " "
> >
> > foreach i ($pfile)
> >         echo " "
> >         echo "*** "$i " ***"
> >         echo " "
> >         echo $i
> >         cat $i | grep -v ^# | grep "="
> 
> bist du sicher, dass $i eine Datei ist? MοΏ½sste das nicht
> echo $i | grep -v ^# | grep "="
> heissen? 

Hi Sven, 

Ja, definitiv das file ... wenn "echo $i" alleine in der Zeile steht, dann
gibt das "/etc/rc.config" (wortwoertlich) als Ausgabe. Da ich aber nicht den
Namen, sondern den _Inhalt_ der Datei brauche, ist es cat $i ...

(dass ich unter der tcsh bin, hat "historische" Gruende ... arbeite seit
Jahren in csh, das faerbt ab ;-)

-- Joerg
Technical Details
Message-ID: <dqufc8.gk3.ln@p60.jha.ch>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <954795685.1431006335@localhost> <38E9153E.1FE13063@gmx.net>

Show Full Headers
Complete Article Headers
X-Google-Language: GERMAN,ASCII
X-Google-Thread: f4b73,7955a30db16a222f
X-Google-Attributes: gidf4b73,public
From: Joerg Hau <joerg.hau@swissonline.ch>
Subject: Re: Problem mit grep-Umleitung in shellscript
Date: 2000/04/05
Message-ID: <dqufc8.gk3.ln@p60.jha.ch>
X-Deja-AN: 607168789
Content-Transfer-Encoding: 8bit
References: <954795685.1431006335@localhost> <38E9153E.1FE13063@gmx.net>
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@dplanet.ch
X-Trace: hs1b01h02-0.dplanet.ch 954957554 3649 212.35.41.9 (5 Apr 2000 17:59:14 GMT)
Organization: I speak for myself
Mime-Version: 1.0
NNTP-Posting-Date: 5 Apr 2000 17:59:14 GMT
Newsgroups: ch.comp.os.linux