The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Cutting specific lines from a file pathanjalireddy Shell Programming and Scripting 15 06-04-2009 02:32 AM
need help cutting consecutive lines with sed or awk raghin Shell Programming and Scripting 2 06-04-2008 05:59 AM
How to count lines - ignoring blank lines and commented lines kthatch UNIX for Dummies Questions & Answers 6 05-25-2007 02:21 AM
Cutting the top two lines, and also charachters below. jalge2 UNIX for Dummies Questions & Answers 5 08-02-2005 03:59 PM
Cutting n consecutive lines from a file... Vishnu UNIX for Dummies Questions & Answers 2 10-18-2002 11:49 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-03-2002
cfoxwell cfoxwell is offline
Registered User
  
 

Join Date: Mar 2001
Location: UK
Posts: 20
Question Cutting lines out using sed I presume.

Happy New Year!!!

I'm trying to cut out some text in a data file where I only want the first line and the last line.

For example.

1. Colin Was here <<-- Text I want to cut out
2. THIS IS THE TEXT I WANT TO CUT <- CUT THIS OUT
3. OUT BECAUSE IT'S NO GOOD TO ME <- CUT THIS OUT
4. I live here <<-- Text I want to cut out

Then put the output of line 1 and 4 into a new file.

Can this be done?

Thanks in advance.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:07 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0