LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2003, 03:48 PM   #1
jsandro7
Member
 
Registered: Nov 2003
Location: Dallas, TEXAS
Distribution: Slackware AMD Athalon XP2200
Posts: 39

Rep: Reputation: 15
Unhappy how do you delet more than 1 line using SED


Hey,
This might sound like a very stupid question? But I can't get the sed to delete more than 1 like at a time. I am using
sed 1d file that works
but when I do
sed 1-3d file gives me a error
what do I type in to delete first 3 line on a file?
Please help
Thanks
 
Old 12-12-2003, 03:53 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
sed '1,3d' <file>
 
Old 12-12-2003, 03:55 PM   #3
jsandro7
Member
 
Registered: Nov 2003
Location: Dallas, TEXAS
Distribution: Slackware AMD Athalon XP2200
Posts: 39

Original Poster
Rep: Reputation: 15
Thanks that works
Stupid me, can't figure out that easy problem
Thank you again
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sed Command : Line Start with benjagol Linux - Newbie 2 05-31-2005 02:28 AM
trying to delete a line with sed deoren Linux - General 2 01-03-2005 09:26 PM
Insert character into a line with sed? & variables in sed? jago25_98 Programming 5 03-11-2004 06:12 AM
sed - multiple matches on the same line mjoc27x Programming 6 04-17-2003 07:22 AM
sed: replace one line with >one line bbeers Programming 3 11-19-2002 05:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration