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

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



Sean Carolan wrote:
> This is kind of odd.
> 
> [scarolan@host:~]$ cat loremipsum.txt
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec quis
> ipsum sed elit laoreet malesuada. Quisque rhoncus dui vitae eros
> euismod fermentum sollicitudin sem scelerisque. Nulla facilisi.
> Maecenas mollis pulvinar euismod. Duis viverra pharetra turpis eget
> feugiat. Nulla facilisi. Nullam facilisis, felis vitae lacinia
> fermentum, enim erat placerat erat, vel imperdiet lorem velit et
> ligula. Nam congue est in nisl lacinia lobortis. Vivamus elementum
> lacinia sodales. Curabitur commodo risus tincidunt augue pulvinar
> vehicula. Morbi eget velit sollicitudin nibh porta molestie. Maecenas
> in augue id quam ullamcorper rutrum.
> 
> [scarolan@host:~]$ vi loremipsum.txt
> [scarolan@host:~]$ myvar=$(grep lorem loremipsum.txt)
> [scarolan@host:~]$ echo $myvar
> Lorem ipsum dolor sit amet, co sectetur adipisci g elit. Do ec quis
> ipsum sed elit laoreet malesuada. Quisque rho cus dui vitae eros
> euismod ferme tum sollicitudi  sem scelerisque. Nulla facilisi. Maece
> as mollis pulvi ar euismod. Duis viverra pharetra turpis eget feugiat.
> Nulla facilisi. Nullam facilisis, felis vitae laci ia ferme tum, e im
> erat placerat erat, vel imperdiet lorem velit et ligula. Nam co gue
> est i   isl laci ia lobortis. Vivamus eleme tum laci ia sodales.
> Curabitur commodo risus ti cidu t augue pulvi ar vehicula. Morbi eget
> velit sollicitudi   ibh porta molestie. Maece as i  augue id quam
> ullamcorper rutrum.
> 
> Where did all the letter n's go?

1. What does "grep lorem loremipsum.txt" say?
2. What does "echo loremipsum.txt | grep lorem" say?


-- 

Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

Google is the Mother, Google is the Father, and traceroute is your
trusty Spiderman...
StarOS, Mikrotik and CentOS/RHEL/Linux consultant
_______________________________________________
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