LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-08-2011, 11:37 AM   #1
ddebbie90
LQ Newbie
 
Registered: Feb 2011
Posts: 17

Rep: Reputation: 0
how can i move the index of a file to another existing file?


i want to move the text of a file to another file,using sed command. how can i do it?
 
Old 02-08-2011, 02:49 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
When you say 'index' are you referring to the index one might find at the back of a book, or are you using the word 'index' in some other context? If the former, and assuming that the index is a self-contained file, you can concatenate it to any other file without using sed.
Code:
cat index.txt >> theOtherFile.txt
The '>>' notation does a redirect of standard IO in 'append' mode (rather than the usual 'overwrite' mode).

Or, if I've misinterpreted your question, please give us more details to clarify.

--- rod.
 
  


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
Script to find tar archives, read tar file contents, output content to an index file. bluesword1969 Linux - General 4 02-07-2011 12:15 PM
[SOLVED] make a folder for each file in a directory then move the file into it genderbender Programming 14 12-02-2010 10:59 AM
squirrel Could not move/copy file. File not attached mrlinux2000 Linux - Software 4 05-24-2010 03:41 AM
how to append contents of one file to another existing file amit_pansuria Programming 1 11-17-2008 10:01 AM
Create header file for existing .c file hk_michael Programming 5 02-25-2005 05:26 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:02 PM.

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