Re: Variable assigned to grep output - missing letter n!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



2011/7/20 Lamar Owen <lowen@xxxxxxxx>:
> On Wednesday, July 20, 2011 03:23:58 PM Sean Carolan wrote:
> [snip]
>> Where did all the letter n's go?
>
> I can't duplicate the problem here on a CentOS 5.6 box.  What locale are you set to?  Here's what I get (note that a copy from the e-mail you sent embedded newlines, which had to be stripped out (one of the many things xargs makes trivially easy) to get the result....):

Here's a simpler example, with a single line in the file:

[scarolan@server:~]$ cat loremipsum.txt
Lorem ipsum dolor sit amet, consectetur adipiscing elit. n n n n n
lots of letter n!

[scarolan@server:~]$ myvar=$(grep Lorem loremipsum.txt)

[scarolan@server:~]$ echo $myvar
Lorem ipsum dolor sit amet, co sectetur adipisci g elit.
lots of letter  !

Weird huh?
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux