Sorry,
Please ignore my previous message.
> Hello,
>
> This is a bit on the side, but the behavior of getline in gawk is a bit
> strange.
> getline $0
> returns 0 when EOF.
>
> but
> getline "myfile.txt"
> never returns 0
> lik
Hello,
This is a bit on the side, but the behavior of getline in gawk is a bit
strange.
getline $0
returns 0 when EOF.
but
getline "myfile.txt"
never returns 0
like if there in no EOF
What am I missing?
===
Pat
quot;Eyal Lebedinsky"
> To: users@lists.fedoraproject.org
> Subject: Re: gawk
>
> On 17/05/18 07:05, Patrick Dupre wrote:
> > Sorry,
> >
> > This is correct, but
> > if I do:
> > print "#" > "tmptmp.txt" ;
> > after
&
ever make a print "#"
Can I avoid these ^M
?
I ran this test:
$ rm "tmptmp.txt"
$ echo a b c d | gawk '{print $1 $2 > "tmptmp.txt" ; print "#" > "tmptmp.txt"}'
And then got the correct output:
$ cat tmptmp.txt
ab
#
You ne
On Wed, May 16, 2018, 18:52 Patrick O'Callaghan
wrote:
> On Wed, 2018-05-16 at 14:43 -0700, Rick Stevens wrote:
> > Patrick, this isn't the first time (or second or third) you've posted
> > a question with absolutely no context about what you're trying to do.
> > If you want help, you HAVE to tel
On Wed, 2018-05-16 at 14:43 -0700, Rick Stevens wrote:
> Patrick, this isn't the first time (or second or third) you've posted
> a question with absolutely no context about what you're trying to do.
> If you want help, you HAVE to tell us what you're trying to accomplish.
And maybe once in a while
; >> Can I avoid these ^M
> >> ?
> >
> > This really isn't the right place for this kind of question, but at
> > least provide a full example of what you're trying to do. You aren't
> > providing enough info to get a useful response.
>
>
least provide a full example of what you're trying to do. You aren't
> providing enough info to get a useful response.
I agree with Sam that you aren't providing enough info. I think
you're saying you're essentially doing (in gawk):
print $1 $2 > "tm
On 05/16/2018 02:05 PM, Patrick Dupre wrote:
This is correct, but
if I do:
print "#" > "tmptmp.txt" ;
after
print $1 $2 > "tmptmp.txt" ;
then I get ^M
in my file
I do not have the ^M if I only make print $1 $2 > "tmptmp.txt" ;
and never make a print "#"
Can I avoid these ^M
?
This
3 28 23 76 12 | | Fax: 03 28 65 82 44
189A, avenue Maurice Schumann | | 59140 Dunkerque, France
===
> Sent: Wednesday, May 16, 2018 at 10:58 PM
> From: "Samuel Sieb"
> T
On 05/16/2018 01:53 PM, Patrick Dupre wrote:
How can I print a "#" with gawk?
Some more context would help, but
gawk -e '{print "#" }'
works.
___
users mailing list -- users@lists.fedoraproject.org
To unsubsc
Hello
How can I print a "#" with gawk?
Thank
===
Patrick DUPRÉ | | email: pdu...@gmx.com
Laboratoire de Physico-Chimie de l'Atmosphère | |
Université du Littor
12 matches
Mail list logo