Sponsored Content
Top Forums Shell Programming and Scripting Copying multiplies files into multiplies directories Post 302496319 by Kossy on Sunday 13th of February 2011 02:59:16 PM
Old 02-13-2011
Thank You Andrew.
Unfortunately, your script copies only one directory set (0...6) and then stops
Code:
$ ls -R
.:
11    11_1  11_3  11_5  17_0  17_2  17_4  17_6
11_0  11_2  11_4  11_6  17_1  17_3  17_5  sortBack2

./11:
ZN_000204_sRGB_g2.tiff  ZN_234121_sRGB_g2.tiff  ZN_235652_sRGB_g2.tiff
ZN_233105_sRGB_g2.tiff  ZN_234630_sRGB_g2.tiff
ZN_233613_sRGB_g2.tiff  ZN_235140_sRGB_g2.tiff

./11_0:

./11_1:

./11_2:

./11_3:

./11_4:

./11_5:

./11_6:

./17_0:
ZN_032122_sRGB_g2.tiff

./17_1:
ZN_032714_sRGB_g2.tiff

./17_2:
ZN_033307_sRGB_g2.tiff

./17_3:
ZN_033901_sRGB_g2.tiff

./17_4:
ZN_034455_sRGB_g2.tiff

./17_5:
ZN_035051_sRGB_g2.tiff

./17_6:
ZN_035648_sRGB_g2.tiff

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying multiple directories at the same time using Unix

Another Unix question. How would I copy multiple directories at the same time? Right now I do: cp -r -f /directory1/ ../backup/directory1/ I do that for each directory one at a time. But there are multiple directories I'd like to copy. So instead of sitting there and doing one at a time, is... (9 Replies)
Discussion started by: JPigford
9 Replies

2. UNIX for Dummies Questions & Answers

copying to multiple directories using wildcard

Can we copy a file to multiple directories using a single command line , i tried with * didnt work for me cp /tmp/a.kool /tmp/folder/*/keys/ I am tryn to copy a.kool file to all keys folder in /tmp folder. is something i am missing ? (4 Replies)
Discussion started by: logic0
4 Replies

3. UNIX for Dummies Questions & Answers

Using find -d and copying to the found directories

Hi again All :) After posting my first thread just a few eeks ago and having such a great response (Thank You once again :) ), I thought I'd perhaps ask the experts again. In short I'm trying to achieve a "find" and "copy" where the find needs to find directories: find -d -name outbox and... (6 Replies)
Discussion started by: Dean Rotherham
6 Replies

4. Shell Programming and Scripting

Backup script: Copying and removing directories based on list

I am writing a simple backup script, but I cannot figure out how to remove directories that are found in a list. For example: DONT_COPY=" .adobe/ .bin/google-earth " tar -zcvf - * --exclude=$DONT_COPY | openssl des3 -salt -k $1 | dd of=$(hostname)-$(date +%Y%m%d).tbz > COPIED Note that... (4 Replies)
Discussion started by: dotancohen
4 Replies

5. Shell Programming and Scripting

Copying a files from a filter list and creating their associated parent directories

Hello all, I'm trying to copy all files within a specified directory to another location based on a find filter of mtime -1 (Solaris OS). The issue that I'm having is that in the destination directory, I want to retain the source directory structure while copying over only the files that have... (4 Replies)
Discussion started by: hunter55
4 Replies

6. Shell Programming and Scripting

Copying all directories while ignoring certain filetypes

I want to write a script that copys over a complete folder including the dirs to another location. However in the process I want to ignore several filetypse that SHOULD NOT get copied over. I know Global Ignore is capable of make the copy command ignore one file type, however I don't know how... (8 Replies)
Discussion started by: pasc
8 Replies

7. Shell Programming and Scripting

Copying data from files to directories

I have the following that I'd like to do: 1. I have split a file into separate files that I placed into the /tmp directory. These files are named F1 F2 F3 F4. 2. In addition, I have several directories which are alphabetized as dira dirb dirc dird. 3. I'd like to be able to copy F1 F2 F3 F4... (2 Replies)
Discussion started by: newbie2010
2 Replies

8. Shell Programming and Scripting

Error check for copying growing directories

I have a simple script which copies directory from one place to another and deleting the source . I am facing a situation when new files gets added when the script has started running. Its resulting in data loss Please suggest a way to avoid data loss. I googled a lot but most are perl... (11 Replies)
Discussion started by: ningy
11 Replies

9. UNIX for Dummies Questions & Answers

Copying Directories from one server to another

Hi, I have a requirement where I have to connect to another server and copy directories from one server to another Directories on the Source server look like below (YYYY-MM-DD- 1 to 23) drwxr-xr-x 2 test_user dmfmart 422 Sep 1 23:45 2014-09-01-18 drwxr-xr-x 2 test_user dmfmart ... (3 Replies)
Discussion started by: arunkesi
3 Replies

10. Shell Programming and Scripting

Copying files to directories based on first 6 character

guys, i did create a script but its too long, though it function the same. # cat nightlyscan.sh #!/usr/ksh deyt=`date +"%Y-%m-%d"` for i in `ls -lrt|grep $deyt|awk '{print $9}'` do cp -f $i /S1/Sophos/logger/ done # but i did not paste it all. this is the desired. (9 Replies)
Discussion started by: kenshinhimura
9 Replies
tiff(3tcl)						      TIFF image manipulation							tiff(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
tiff - TIFF reading, writing, and querying and manipulation of meta data SYNOPSIS
package require Tcl 8.2 package require tiff ?0.2.1? ::tiff::isTIFF file ::tiff::byteOrder file ::tiff::numImages file ::tiff::dimensions file ?image? ::tiff::imageInfo file ?image? ::tiff::entries file ?image? ::tiff::getEntry file entry ?image? ::tiff::addEntry file entry ?image? ::tiff::deleteEntry file entry ?image? ::tiff::getImage file ?image? ::tiff::writeImage image file ?entry? ::tiff::nametotag names ::tiff::tagtoname tags ::tiff::debug file _________________________________________________________________ DESCRIPTION
This package provides commands to query, modify, read, and write TIFF images. TIFF stands for Tagged Image File Format and is a standard for lossless storage of photographical images and associated metadata. It is specified at http://partners.adobe.com/public/devel- oper/tiff/index.html. Multiple images may be stored in a single TIFF file. The ?image? options to the functions in this package are for accessing images other than the first. Data in a TIFF image is stored as a series of tags having a numerical value, which are represented in either a 4 digit hexadecimal format or a string name. For a reference on defined tags and their meanings see http://www.awaresystems.be/imaging/tiff/tiff- tags.html COMMANDS
::tiff::isTIFF file Returns a boolean value indicating if file is a TIFF image. ::tiff::byteOrder file Returns either big or little. Throws an error if file is not a TIFF image. ::tiff::numImages file Returns the number of images in file. Throws an error if file is not a TIFF image. ::tiff::dimensions file ?image? Returns the dimensions of image number ?image? in file as a list of the horizontal and vertical pixel count. Throws an error if file is not a TIFF image. ::tiff::imageInfo file ?image? Returns a dictionary with keys ImageWidth, ImageLength, BitsPerSample, Compression, PhotometricInterpretation, ImageDescription, Orientation, XResolution, YResolution, ResolutionUnit, DateTime, Artist, and HostComputer. The values are the associated properties of the TIFF ?image? in file. Values may be empty if the associated tag is not present in the file. puts [::tiff::imageInfo photo.tif] ImageWidth 686 ImageLength 1024 BitsPerSample {8 8 8} Compression 1 PhotometricInterpretation 2 ImageDescription {} Orientation 1 XResolution 170.667 YResolution 170.667 ResolutionUnit 2 DateTime {2005:12:28 19:44:45} Artist {} HostComputer {} There is nothing special about these tags, this is simply a convience procedure which calls getEntry with common entries. Throws an error if file is not a TIFF image. ::tiff::entries file ?image? Returns a list of all entries in the given file and ?image? in hexadecimal format. Throws an error if file is not a TIFF image. ::tiff::getEntry file entry ?image? Returns the value of entry from image ?image? in the TIFF file. entry may be a list of multiple entries. If an entry does not exist, an empty string is returned set data [::tiff::getEntry photo.tif {0131 0132}] puts "file was written at [lindex $data 0] with software [lindex $data 1]" Throws an error if file is not a TIFF image. ::tiff::addEntry file entry ?image? Adds the specified entries to the image named by ?image? (default 0), or optionally all. entry must be a list where each element is a list of tag, type, and value. If a tag already exists, it is overwritten. ::tiff::addEntry photo.tif {{010e 2 "an example photo"} {013b 2 "Aaron F"}} The data types are defined as follows 1 BYTE (8 bit unsigned integer) 2 ASCII 3 SHORT (16 bit unsigned integer) 4 LONG (32 bit unsigned integer) 5 RATIONAL 6 SBYTE (8 bit signed byte) 7 UNDEFINED (uninterpreted binary data) 8 SSHORT (signed 16 bit integer) 9 SLONG (signed 32 bit integer) 10 SRATIONAL 11 FLOAT (32 bit floating point number) 12 DOUBLE (64 bit floating point number) Throws an error if file is not a TIFF image. ::tiff::deleteEntry file entry ?image? Deletes the specified entries from the image named by ?image? (default 0), or optionally all. Throws an error if file is not a TIFF image. ::tiff::getImage file ?image? Returns the name of a Tk image containing the image at index ?image? from file Throws an error if file is not a TIFF image, or if image is an unsupported format. Supported formats are uncompressed 24 bit RGB and uncompressed 8 bit palette. ::tiff::writeImage image file ?entry? Writes the contents of the Tk image image to a tiff file file. Files are written in the 24 bit uncompressed format, with big endian byte order. Additional entries to be added to the image may be specified, in the same format as tiff::addEntry ::tiff::nametotag names Returns a list with names translated from string to 4 digit format. 4 digit names in the input are passed through unchanged. Strings without a defined tag name will throw an error. ::tiff::tagtoname tags Returns a list with tags translated from 4 digit to string format. If a tag does not have a defined name it is passed through unchanged. ::tiff::debug file Prints everything we know about the given file in a nice format. VARIABLES
The mapping of 4 digit tag names to string names uses the array ::tiff::tiff_tags. The reverse mapping uses the array ::tiff::tiff_sgat. LIMITATIONS
[1] Cannot write exif ifd [2] Reading limited to uncompressed 8 bit rgb and 8 bit palletized images [3] Writing limited to uncompressed 8 bit rgb BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category tiff of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
image, tif, tiff CATEGORY
File formats COPYRIGHT
Copyright (c) 2005-2006, Aaron Faupell <afaupell@users.sourceforge.net> tiff 0.2.1 tiff(3tcl)
All times are GMT -4. The time now is 05:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy