The UNIX and Linux Forums  

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



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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Writing files without temporary files bashshadow1979 Shell Programming and Scripting 2 04-17-2009 05:09 PM
writing data in a text file at particular line punitpa Shell Programming and Scripting 2 04-14-2009 02:45 PM
What files are writing to a directory hattorihanzo UNIX for Dummies Questions & Answers 3 01-17-2006 12:00 PM
Picking out text from one file and writing it to another. scottf33 UNIX for Dummies Questions & Answers 5 05-20-2005 10:43 AM
grep multiple text files in folder into 1 text file? coppertone UNIX for Dummies Questions & Answers 7 08-23-2002 03:50 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-17-2009
#moveon #moveon is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 40
Writing a text to many files

Is there a command in shell-script that I can use that copies a string or writes it to many files? Say I have files a, b and c and I want to copy or write the text "Hallo, I am a newbie!" to all these files? I know I can do echo "Hallo, I am a newbie!" > a but this only copies it to one file. How can I do it to copy to all without repeating this command again and again.

Thanks in advance.
  #2 (permalink)  
Old 06-17-2009
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
'man tee'

Code:
echo 'Hallo, I am a newbie!' | tee a b c > /dev/null

  #3 (permalink)  
Old 06-17-2009
#moveon #moveon is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 40
Thanks!
Reply

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 On




All times are GMT -4. The time now is 05:54 AM.


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