The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-13-2008
dala dala is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 7
retrieved multiple lines on multiple places in a file

I have a file containing the following lines:

first line
second line
third line
something goes here
something else goes here
something goes here
first line1
second line2
third line3

I need to go through the file and retrieved these lines and print them the output should look like this:

first line
second line
third line
first line1
second line2
third line3

Please help me get start it. I used while loop but the output wasn’t what I want it.