[lug] Simple (?) bash+grep issue

David Anselmi anselmi at anselmi.us
Wed May 11 22:19:45 MDT 2005


Jeff Schroeder wrote:
> Dave:
> 
>>I think you're wrong.  When I do the above I get a number of lines
>>with one word on each.  There are no blank lines.  If I add -n to the
>>echo I get all the words on one line (no white space) and my prompt
>>on the same line (no trailing line feed).
> 
> Holy cow, you're right.  I invented that example (without really testing 
> it) because that's basically what I was doing.  It turns out the file I 
> was actually parsing had MS-DOS control-M's in it (ugh) and they were 
> causing the newline issues.

At least they're easy to deal with (tr would be my first choice).

Dave



More information about the LUG mailing list