Article View: pl.comp.os.hp-ux
Article #4010Re: Problem ze skryptem
From: Szejku
Date: Fri, 20 Feb 2004 16:40
Date: Fri, 20 Feb 2004 16:40
43 lines
1887 bytes
1887 bytes
> > a chcialbym miec: > > > 123 43 23 234 > > 234 45 643 345 > > 551 365 94 199 > > ... > > napisalem skrypt: > > > > #!/bin/sh > > cat plik1.txt | while read x y z w > > do > > printf "%s\t%s\t%s\t%s\n" $x $y $z $w > > done > > > > no i nie dziala... dostaje to samo, co w pliku. > > Np. > #!/bin/sh > while read x > read y > read z > read w > read > do > printf "%s\t%s\t%s\t%s\n" $x $y $z $w > done <plik1.txt > > Pozdrowienia, > LW Dziekuje, a dlaczego, jezeli w mojej wersji nie dawalem znaku "\n", to wyrzucal wszystko "szeregowo" ? I jeszcze jedno pytanko formalne, jesli mozna - gdybym napisal: while read x y z w < plik1.txt do ... done to tylko zmienna w bylaby wczytywana z plik1.txt, a reszta bylaby wprowadzana z stdin?? Pozdrawiam, Maciek
Technical Details
Message-ID:
<c15ddg$16g$1@nemesis.news.tpi.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsfeed.gazeta.pl!news.task.gda.pl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailReferences:
<65ac.000001bb.403603c2@newsgate.onet.pl> <c152sq$v46$1@srv.cyf-kr.edu.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsfeed.gazeta.pl!news.task.gda.pl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: "Szejku" <niepytajkto@poczta.onet.pl> Newsgroups: pl.comp.os.hp-ux Subject: Re: Problem ze skryptem Date: Fri, 20 Feb 2004 17:40:14 +0100 Organization: tp.internet - http://www.tpi.pl/ Lines: 46 Message-ID: <c15ddg$16g$1@nemesis.news.tpi.pl> References: <65ac.000001bb.403603c2@newsgate.onet.pl> <c152sq$v46$1@srv.cyf-kr.edu.pl> NNTP-Posting-Host: vp191.neoplus.adsl.tpnet.pl X-Trace: nemesis.news.tpi.pl 1077295345 1232 80.50.135.191 (20 Feb 2004 16:42:25 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Fri, 20 Feb 2004 16:42:25 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit