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.txt" ;
>> and never make a print "#"
>>
>> 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.
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 > "tmptmp.txt";
print "#" > "tmptmp.txt";
And ending up with a "^M" in your file. First off, the second line
would overwrite anything you did in the first line (you need to use a
">>" to APPEND data to an existing file...just like in the shell), and
the "^M" probably indicates a carriage return in the file. If you
changed the ORS (output record separator) to a carriage return from it's
default value of newline, that's what you'd get.
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.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital [email protected] -
- AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 -
- -
- Admitting you have a problem is the first step toward getting -
- medicated for it. -- Jim Evarts (http://www.TopFive.com) -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]