![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| recursively concatenate files in subdirectories with same folder name | joyce007 | UNIX for Dummies Questions & Answers | 2 | 2 Weeks Ago 12:41 AM |
| ls command to list recursively ONLY subdirectories | HLee1981 | UNIX for Dummies Questions & Answers | 5 | 05-14-2009 02:19 AM |
| Recursively go thorough subdirectories and checkout files | shajiasalim | Shell Programming and Scripting | 3 | 08-13-2008 06:28 AM |
| Concatenate all the files in folder on timestamps | srikanthgr1 | Shell Programming and Scripting | 19 | 08-10-2007 09:21 AM |
| How to move recursively into one folder | patrick99e99 | UNIX for Dummies Questions & Answers | 2 | 06-27-2006 06:50 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I'm trying to concatenate files in subdirectories with the same folder name. Say concatenate all the files in the 'current' subdirectories in 'Literature' parent directory.
Literature/USA/current/ Literature/Europe/current/ Can anyone help with it? Thanks a lot! |
|
||||
|
1. this works, but not to a great extent.
Code:
$ cat script.sh
for i in `find . -not -iname '.' -type d`
do
echo $i
cd $i
find . -maxdepth 1 -type f -exec cat {} >> ./$i.file \;
cd ..
done
recursively concatenate files in subdirectories with same folder name 3. try editing that script to your need, for clarifications come here again.. |
|
||||
|
A oneline title with nothing in the msg body wont help...provide an example of what you mean by all this.
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|