Re: gawk/getline

2018-08-04 Thread Patrick Dupre
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 > like if there in no EOF > > What am I missing? > > =

Re: gawk

2018-05-17 Thread Patrick Dupre
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 &

Re: gawk

2018-05-16 Thread Eyal Lebedinsky
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

Re: gawk

2018-05-16 Thread Terry Polzin
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

Re: gawk

2018-05-16 Thread Patrick O'Callaghan
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

Re: gawk

2018-05-16 Thread Jon LaBadie
On Wed, May 16, 2018 at 02:43:09PM -0700, Rick Stevens wrote: > On 05/16/2018 02:11 PM, Samuel Sieb wrote: > > 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

Re: gawk

2018-05-16 Thread Rick Stevens
On 05/16/2018 02:11 PM, Samuel Sieb wrote: > 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.

Re: gawk

2018-05-16 Thread Samuel Sieb
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

Re: gawk

2018-05-16 Thread Patrick Dupre
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

Re: gawk

2018-05-16 Thread Samuel Sieb
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 unsubscribe send an email to users-le...@lists.fed