>
> On Fri, Jan 11, 2002 at 03:02:54PM +0100, Lentila de Vultur wrote:
> >
> >
> > cum pot sa scriu intr-un fishier folosind awk? (gnu awk 3.1.0)
> > am incercat:
> >
> > user@statzie:~/bin> awk '{print "22" > file }'
> >
> > awk: cmd. line:1: (FILENAME=- FNR=1) fatal: expression for `>'
> redirection
> > has null string value
> > user@statzie:~/bin>
> > dupa ce am lansat comanda am mai dat un "enter" -> linia goala care
> apare
> > inainte de mesajul de eroare.
>
> awk '{print "22"; }'
> nu merge. poti incerca
> echo | awk '{print "22"; }'
>
>
> >
> > am un script bash cu linii awk shi vreau ca o variabila setata de awk sa
> o
> > folosesc in scriptul bash. se poate shi altcumva fatza de cum am incert
> io?
>
> 2. nu stiu cum face awk redirect to file, dar de ce nu foloseti bash
> pentru asta?
> a=$(echo | awk '{print "22";}') ; echo $a
10x, dar nu pot folosi asta.
am ceva de genul
#!/bin/bash
[comenzi]
echo $string | awk -F. '{ [prelucrez string, afishez daca is erori, scriu
ceva intr-un fishier] }'
[citesc din fishier, prelucrez cu bash]
man awk:
print expr-list >file Prints expressions on file. Each
expression is separated by the value
of the OFS variable. The output
record is terminated with the value
of the ORS variable.
print ... >> file
appends output to the file.
--
Lentila de Vultur
"Daca mai multe persoane imi spun ca sunt beat ma duc sa-mi curatz
ochelarii."
Sent through GMX FreeMail - http://www.gmx.net
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
unsubscribe from this list.