LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-07-2006, 05:38 AM   #1
blackzone
Member
 
Registered: Jun 2004
Posts: 256

Rep: Reputation: 30
quickly append text to file


how do I quickly append the text "abc" to a file called "file1"?

I'm pretty sure I have done it before. Just can't remember.
 
Old 09-07-2006, 05:40 AM   #2
PsypherPunk
Member
 
Registered: Jul 2005
Location: Leeds, UK
Distribution: SuSE 10.0
Posts: 108

Rep: Reputation: 15
Code:
cat "abc" >> file1
...i think.
 
Old 09-07-2006, 05:43 AM   #3
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
Its

echo abc >> file1

cat will look for a file by name 'abc' and append the file to 'file1'.
 
Old 09-07-2006, 05:48 AM   #4
PsypherPunk
Member
 
Registered: Jul 2005
Location: Leeds, UK
Distribution: SuSE 10.0
Posts: 108

Rep: Reputation: 15
Quote:
Originally Posted by zulfilee
cat will look for a file by name 'abc' and append the file to 'file1'.
Aha! Well spotted.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
pipe output to append to a text file davee Linux - Newbie 5 03-22-2016 07:44 PM
Hard drive file system problem, I think...please HELP QUICKLY rivalmist Fedora 7 01-23-2009 08:26 AM
bash help? append text to textfile entries embsupafly Programming 9 08-07-2005 07:01 AM
batch append string to the end of a determined line in text files osio Programming 6 06-30-2005 09:28 AM
append to file d-rez Linux - Newbie 2 06-20-2002 04:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:16 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