Sponsored Content
Top Forums Shell Programming and Scripting Copying a directory structure with the latest versions of files Post 302351377 by Glyn_Mo on Tuesday 8th of September 2009 10:57:45 AM
Old 09-08-2009
Copying a directory structure with the latest versions of files

Hello

I have three directory structures for code releases.

Each directory structure looks like this:

bash-3.00$ ls -R | more

.:
Test_Release_1
Test_Release_2
Test_Release_3

./Test_Release_1/dbcode:

rp_online_import_srdp.pkb-1
srdp_ar_validation.pkb-1
srdp_rp_aclaim_detail_qry_pkg.pkb-1
srdp_rp_common_qry_pkg.pkb-1

./Test_Release_2/dbcode:

rp_online_import_srdp.pkb-2
srdp_ar_validation.pkb-2
srdp_rp_aclaim_detail_qry_pkg.pkb-2
srdp_rp_common_qry_pkg.pkb-2

./Test_Release_3/dbcode:

rp_online_import_srdp.pkb-3
srdp_ar_validation.pkb-3
srdp_rp_aclaim_detail_qry_pkg.pkb-3
srdp_rp_common_qry_pkg.pkb-3

What I'm wanting to do is, is to create a composite directory called "Test_Releases_1-3" which will have the same structure (with a dbcode directory), but will only copy scripts with the highest version number into the dbcode folder of the new composite directory "Test_Releases_1-3". In the new composite release structure I only want to get the very latest versions of scripts. The code release directories often contain multiple versions of the same package.

I'm needing to write a script which will create the composite release directory automatically, only extracting the latest version of packages from the original release directories.

Hope that made some sort of sense.

Thanks in advance
Glyn
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying a Directory Structure to a new structure

Hi all Is it possible to copy a structure of a directory only. e.g. I have a file with the following entries that is a result of a find :- /dir1/dir2/file.dbf /dir1/dir2/dir3/file1.dbf /dir1/file.dbf I want to copy these to a directory and keep the structure however starting at a new dir... (8 Replies)
Discussion started by: jhansrod
8 Replies

2. UNIX for Dummies Questions & Answers

Copying files with the latest date

Hi All, I have a situation where I need to copy the files having the latest date. For example I have a file by name bas100e1_jun05. I need to copy it to bas100e1. But when a file by name bas100e1_jul05 is put in the same directory the script should copy the file having the latest month which... (34 Replies)
Discussion started by: shashi_kiran_v
34 Replies

3. UNIX for Advanced & Expert Users

MV files from one directory structure(multiple level) to other directory structure

Hi, I am trying to write a script that will move all the files from source directory structure(multiple levels might exist) to destination directory structure. If a sub folder is source doesnot exist in destination then I have to skip and goto next level. I also need to delete the files in... (4 Replies)
Discussion started by: srmadab
4 Replies

4. UNIX for Dummies Questions & Answers

Copying with directory structure

Hi, I need to copy a set of directories along with all sub directories and files from one unix box to another. Any ideas? cnfsed (4 Replies)
Discussion started by: Cnfsed
4 Replies

5. Shell Programming and Scripting

redirection and copying with same directory structure

Dear Experts, How can I solve this problem ? I want to redirect with having the same directory structure as in my input. for temp in `find ./CSV/ -name "*.v"` do fname = `basename $temp` ./script.sh $temp > ./out/$fname done But my problem here is all the... (3 Replies)
Discussion started by: user_prady
3 Replies

6. UNIX for Dummies Questions & Answers

latest files copying over to new path

ls -lrt | nawk -v D="$(date +'%b%e:'| sed 's/ //g')" 'D==$6$7":"{sub(".*"$9,$9);print}' This picks only the latest files created based on the timestamp for that particular day.. how do i copy over the same files to a different location???? (1 Reply)
Discussion started by: win4luv
1 Replies

7. Shell Programming and Scripting

Copying files to new dir structure.

I am trying to figure out a way to script copying specific files from one dir structure to another. I have a dir structure like this: dira/author 1/book 1/file a.epub /book 2/file b.epub /author 2/book 1/file c.epub /author 3/book 1/file d.epub /book 2/file... (2 Replies)
Discussion started by: arcanas
2 Replies

8. Shell Programming and Scripting

Perl : copying only the latest file to other directory

In linux.. In a directory there are 3 files which I want to copy only the latest file (ls -ltr myfiles*.txt|tail -1) to other directory in perl? Could anyone please help me with the code? Regards, J (1 Reply)
Discussion started by: scriptscript
1 Replies

9. Shell Programming and Scripting

Help with korn shell script to get the latest file versions in a directory

I want to write a korn shell script to get the latest three versions for a file in the directory having lot of files with various versions (files with prefix as same but time stamp as suffix) and compress it and at the same time have to remove the remaining versions of the file (other than latest... (4 Replies)
Discussion started by: maheshbabu
4 Replies

10. Shell Programming and Scripting

Copying files from various folders to similar folder structure in another location

Hi, I need to write a script the has to copy the files from folders and subfolders to the same folder structure located in another location. Ex: mainfolder1 file1,file2,file3 subfolder1(file1,etc) subfolder2(file1,etc) to another folder location of same folder structure. rsync is not... (7 Replies)
Discussion started by: Raji Perumal
7 Replies
COMPOSITE_SAMPLER(1)						   Audio Plugins					      COMPOSITE_SAMPLER(1)

NAME
composite_sampler - audio sampler/synth plugin (LV2) DESCRIPTION
The Composite sampler is an audio plugin (LV2) that provides a simple sampling engine. It is identified by the URI "http://gabe.is-a-geek.org/composite/plugins/sampler/1" PORTS
The sampler includes the following ports: +-------+-----------+-------------+--------+-------------------------+ |Name | LV2 Port | Type | Flow | Description | +-------+-----------+-------------+--------+-------------------------+ |Left | out_left | AudioPort | Output | Left stereo channel | | | | | | output | +-------+-----------+-------------+--------+-------------------------+ |Right | out_right | AudioPort | Output | Right stereo channel | | | | | | output | +-------+-----------+-------------+--------+-------------------------+ |MIDI | midi | EventPort | Input | Main MIDI Input | +-------+-----------+-------------+--------+-------------------------+ |Volume | volume | ControlPort | Input | Master volume [0.0-1.0] | +-------+-----------+-------------+--------+-------------------------+ CONTROLLING THE SAMPLER
The primary way to control the sampler is over MIDI. See composite_midi(7) for complete documentation on the MIDI implementation. DRUMKITS
The drumkits for Composite are the same as for Hydrogen. To reuse your Hydrogen drumkits, copy or symlink them to $HOME/.composite/data/drumkits/. You can create and edit drumkits with composite-gui (or Hydrogen). PRESETS
The sampler responds to MIDI Program Change events. Based on the event that it receives, it will load up another file (e.g. a drumkit). This is how you can select the drumkit that you wish to use. The presets are defined in a file $HOME/.composite/data/presets/default.xml. For the sampler plugin, you can override this by using default-presets.xml, but at the current time there is no need to. When you first load the sampler, it will check for this file. If it doesn't exist, it will create one based on all your user drumkits. The presets file is a simple XML file that allows you to define MIDI banks, and assign different resources for each program change. An example file is as follows: <?xml version="1.0"?> <T:tritium xmlns:T="http://gabe.is-a-geek.org/tritium/xml/1/"> <T:presets> <T:bank coarse="0" fine="0"> <T:program> <T:midi_number>0</T:midi_number> <T:resource>tritium:drumkits/GMkit</T:resource> </T:program> <T:program> <T:midi_number>1</T:midi_number> <T:resource>tritium:drumkits/TR808EmulationKit</T:resource> </T:program> </T:bank> </T:presets> </T:tritium> You can define several <bank> elements for the MIDI banks. The attributes coarse and fine correspond to the MIDI CC's 0 and 32. Each <program> section is a preset. The <midi_number> corresponds to the number in the PC message. The <resource> element holds a URI/URL to the thing you want loaded. This will typically be a drum kit, but can be any kind of file that Composite supports (like a .h2song, .h2pattern, etc.). The sampler will do the Right Thing. (For example, when loading an .h2song, the drumkit stored in the song will be loaded.) The URL's supported are file://, tritium:, and file names. The tritium: scheme is designed to create portable URL's to things like drum kits. For example, the URL "tritium:drumkits/GMkit" will load the drumkit "GMkit", whether it's installed in the user directory ($HOME/.composite/data/drumkits/GMkit/drumkit.xml) or in the system directory (/usr/share/composite/data/drumkits/GMkit/drumkit.xml). Note The XML namespace declaration "http://gabe.is-a-geek.org/tritium/xml/1/" is not optional. LV2 EXTENSIONS This plugin uses the following extensions, and they must be supported by any program (host) that wishes to use this plugin. If the host does not support them, the plugin will fail to load. o Events <http://lv2plug.in/ns/ext/event#> o Midi Events <http://lv2plug.in/ns/ext/midi#MidiEvent> FILES
/usr/share/composite/data/ -- This is the main folder where system data (drumkits, presets, etc.) are stored for Composite and Composite Sampler. $HOME/.composite/data/ -- This is the main folder where user data (drumkits, presets, etc.) are stored for Composite and Composite Sampler. $HOME/.composite/data/drumkits/ -- This is the main folder where user drumkits are stored. Each drumkit has its own folder, and each folder has a file 'drumkit.xml' that describes the drumkit. $HOME/.composite/data/presets/default.xml -- This is the default presets file for Composite. If it does not exist, it will be created automatically using all of your installed drumkits. $HOME/.composite/data/presets/default.xml -- This is the default presets file for Composite. If it does not exist, it will be created automatically using all of your installed drumkits. $HOME/.composite/data/presets/default-plugin.xml -- This is the default presets file for the Composite Sampler. If it does not exist, then $HOME/.composite/data/presets/default.xml is used. KNOWN BUGS
Loading a .h2song through the presets is not happening in a real-time safe manner. Loading drumkits works fine. SEE ALSO
composite_midi(7), lv2_jack_host(1) AUTHOR
Gabriel M. Beddingfield <gabriel@teuton.org> Composite 03/18/2010 COMPOSITE_SAMPLER(1)
All times are GMT -4. The time now is 03:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy