On 17/05/18 07:05, Patrick Dupre wrote:
Sorry,

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
?

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 need to show exactly what you did, like
- what command did you run?
- how did you examine the output file?

A console transcript will be a good start.

HTH

Thank.

===========================================================================
  Patrick DUPRÉ                                 | | email: [email protected]

--
Eyal Lebedinsky ([email protected])
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to