[lug] Simple (?) bash+grep issue

Jeff Schroeder jeff at neobox.net
Wed May 11 21:41:15 MDT 2005


> 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.

Note to self: stick to Unix file formats... ;)


More information about the LUG mailing list