The UNIX and Linux Forums  


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



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 !!

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-07-2009
Banned (Student Posting Homework)
 

Join Date: Nov 2009
Posts: 9
How can I append a text at end of file after displaying the file

I have a file "sample.txt" with the content as below:
Hi
This is a Sample Text.

I need a single command using cat which serve the following purpose.

1.display the contents of sample.txt
2.append some text to it
3. and then exit

But, all should be served by a sinle command.
  #2 (permalink)  
Old 11-07-2009
DukeNuke2's Avatar
Soulman
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 3,216
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Sponsored Links
Closed Thread

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 Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
append a text to a file every month depakjan UNIX for Dummies Questions & Answers 1 06-30-2009 05:20 AM
Displaying text file in browser - perl Dabheeruz Shell Programming and Scripting 3 12-11-2008 08:28 PM
Displaying text file in browser - perl Dabheeruz Shell Programming and Scripting 1 12-11-2008 08:10 PM
Append text at end of the first line in a file catgovind Shell Programming and Scripting 7 05-01-2008 08:33 AM
how to append text into a file. beilstwh Shell Programming and Scripting 2 03-06-2007 05:51 PM



All times are GMT -4. The time now is 02:24 PM.


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