Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

grep & echo

happy10319Jun 4 2019 — edited Jun 4 2019

Hi,

I have a file Addressbook.txt

Content is:

John Smith: 54321:john@smith.example.com

John Abarak: 54356:john@abarak.example.com

Timn Kith: 76321:timn@kith.example.com

I run:

myrow=$(grep -i John Addressbook.txt)

echo $myrow

the out put is :

John Smith: 54321:john@smith.example.com John Abarak: 54356:john@abarak.example.com

How can I have two different lines with echo?

Thanks.

This post has been answered by Nik on Jun 4 2019
Jump to Answer

Comments

Post Details

Added on Jun 4 2019
2 comments
196 views