LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-13-2012, 06:03 AM   #1
gajananh999
Member
 
Registered: Aug 2012
Posts: 94

Rep: Reputation: Disabled
Smile How to copy one line from one file to another file on line number..


Hi,

I have one log file. and i want move one line from log.txt file to my new file on line number.

how to do this


Please Help me.
 
Old 08-13-2012, 06:27 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
SED will do this. See here: http://www.grymoire.com/Unix/Sed.html

Are these homework questions?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Create File Listing in C++ that will generate a line number on every line of code marzrocks Programming 11 04-12-2010 07:10 AM
C - Copy File Line By Line With Some Slight Changes golmschenk Programming 11 03-03-2010 02:46 PM
bash : read every line from text file starting at given line number quadmore Programming 4 02-20-2009 01:29 PM
Copy line from file and write it to another file shokeer Linux - Newbie 2 11-01-2008 07:54 AM


All times are GMT -5. The time now is 04:44 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration