The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find link files aju_kup Shell Programming and Scripting 4 07-02-2009 06:49 AM
Link files.... Tom Bombadil UNIX for Dummies Questions & Answers 1 05-11-2005 09:05 PM
Permissions on link files moviestud80 UNIX for Dummies Questions & Answers 2 04-01-2005 04:01 PM
Link files in unix yuvasyntel Shell Programming and Scripting 2 12-25-2002 08:55 AM

Closed Thread
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 12-04-2006
fredao fredao is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 59
link files together

if I have 1000 files, named file1, file2, ... ,file1000. for each one, I want to append a line, for example "this is the end of file#".

then, I want to link them all together.

how can I do that by using a simple script?
  #2 (permalink)  
Old 12-04-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,754
Code:
find /path -name 'file*' |\
while read file
do
     echo "end of $file" >> $file
     cat $file
done > newfile
newfile now has all of the file1... file1000 files in it. If you have room on the disk....
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 On




All times are GMT -4. The time now is 07:05 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