how can i write a routine, lets say show, that reads several files, grap the string i give than give th output the following way:<br>
<br>
show a<br>
a<br>
just some tekst<br>
like this<br>
awk<br>
a tekst routine<br>
you must be able to work with<br>
<br>
In the file the tekst is like this:<br>
a,just some tekst<br>
a,like this<br>
awk,you must be able to work with<br>
awk,a tekst routine<br>
<br>
As You see the tekst is spitted in two part delimmeted by a ",". The files al end with txt<br>
<br>
I started with:<br>
grep -i $1 /home/mydir/doc/showdir/*.txt¦sort<br>
<br>
This example give the output sorted but not displayd as i want. The right way is<br>
print $1<br>
go to the next line<br>
print "\t"$2<br>
read next input line<br>
if $1 == previous $1 print "/t" $2<br>
if $1 !== previous $1 print $1<br>
"/t" $2<br>
end routine<br>
<br>
If anyone can help me please respond to:<br>
<A HREF="mailto:w.alsemgeest@hccnet.nl">w.alsemgeest@hccnet.nl</A><br>
or<br>
<A HREF="mailto:w.l.alsemgeest@ptt-post.nl">w.l.alsemgeest@ptt-post.nl</A><br>
<br>
show a<br>
a<br>
just some tekst<br>
like this<br>
awk<br>
a tekst routine<br>
you must be able to work with<br>
<br>
In the file the tekst is like this:<br>
a,just some tekst<br>
a,like this<br>
awk,you must be able to work with<br>
awk,a tekst routine<br>
<br>
As You see the tekst is spitted in two part delimmeted by a ",". The files al end with txt<br>
<br>
I started with:<br>
grep -i $1 /home/mydir/doc/showdir/*.txt¦sort<br>
<br>
This example give the output sorted but not displayd as i want. The right way is<br>
print $1<br>
go to the next line<br>
print "\t"$2<br>
read next input line<br>
if $1 == previous $1 print "/t" $2<br>
if $1 !== previous $1 print $1<br>
"/t" $2<br>
end routine<br>
<br>
If anyone can help me please respond to:<br>
<A HREF="mailto:w.alsemgeest@hccnet.nl">w.alsemgeest@hccnet.nl</A><br>
or<br>
<A HREF="mailto:w.l.alsemgeest@ptt-post.nl">w.l.alsemgeest@ptt-post.nl</A><br>