09-19-2016
Quote:
Originally Posted by
jim mcnamara
More specifically, to allow us to help you to create regular expression syntax and a script:
Absolutely! Thanks for your response.
- Years that would be valid = 1900-2000's and going forward.
- All files will have .tif file extension. Not valid, otherwise.
- Creation date doesn't matter. The date within the file name (e.g. name-2001_filename-123.tif) will be named by a human. This is where the script must check and confirm the naming convention formatting, is correct.
Essentially, it will contain a year and some sort of file naming convention indicative to the image. Here's the format:
locationabbreviation-year-orgnumber_imagenumber.tif
examples:
bldg1-1996-org101_F-12345.tif
bldgzone-2001-org234_ZTW-12345.tif
.
- Not delete bad file name, but move to a "bad file" directory or so. If the file doesn't follow this formatting, its kicked out to the "bad file" directory.
Last edited by rbatte1; 09-19-2016 at 12:53 PM..
Reason: Added CODE tags and formatted lists rather than text lists
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Greetings -
I am a newbie in shell scripts. I have been thru the whole forum but there has been no similar query posed.
The objective of my system is to have a unified filebase system. I am using RSync to synchronise files between the location & central server with both of them having the... (4 Replies)
Discussion started by: evolve
4 Replies
2. Shell Programming and Scripting
I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves.
Also, the script should only move a file from /exports to... (6 Replies)
Discussion started by: nikosey
6 Replies
3. Shell Programming and Scripting
Hi,
I am new to scripting. I need a script to sort and the records in a file and then split them into different files.
For example, the file is:
H1......................
H2......................
D2....................
D2....................
H1........................... (15 Replies)
Discussion started by: Sunitha_edi82
15 Replies
4. Shell Programming and Scripting
Hi,
I am running this is korn shell
cp $source/$fname $dest/dir && rm $source/$fname
This was returned:
rm: /dir/file not removed: No such file or directory
The file could be found in the $dest directory which meant the cp was success.
The above code is used in a for loop to move... (5 Replies)
Discussion started by: Leion
5 Replies
5. UNIX for Dummies Questions & Answers
Hey,
I have a WebDav directory mounted and everything seems fine except for one thing. All file/directory names appear in all UPPERCASE, when in actual fact they are lowercase on the remote machine.
For example:
foo/bar/baz.html on the remote host, appears on my local machine as... (0 Replies)
Discussion started by: MrMoney
0 Replies
6. UNIX for Dummies Questions & Answers
Dear unix gurus,
I have a data file with header information about a subject and also 3 columns of n rows of data on various items he owns. The data file looks something like this:
adam peter
blah blah blah
blah blah blah
car
01 30 200
02 31 400
03 57 121
.. .. ..
.. .. ..
n y... (8 Replies)
Discussion started by: tintin72
8 Replies
7. Shell Programming and Scripting
Hello All
I have a xml file with many sets of records
like this
<mytag>mydata</mytag>
<tag2>data&</tag2>
also same file can be like this
<mytag>mydata</mytag>
<tag2>data&</tag2>
<tag3>data2&data3</tag3>
Now i can grep & and replace with & for whole file but it will replace all... (4 Replies)
Discussion started by: lokaish23
4 Replies
8. Shell Programming and Scripting
I have a set of files in path /ifx01/etldata/lmt/
a.xml
b.xml
I have to archive & move these files to path /ifx01/etldata/archive ,so that not even the original files should exists.
After acrhiving there should be no files in path /ifx01/etldata/lmt/ (6 Replies)
Discussion started by: jagadeeshn04
6 Replies
9. Shell Programming and Scripting
cat file1.txt
field1 "user1":
field2:"data-cde"
field3:"data-pqr"
field4:"data-mno"
field1 "user1":
field2:"data-dcb"
field3:"data-mxz"
field4:"data-zul"
field1 "user2":
field2:"data-cqz"
field3:"data-xoq"
field4:"data-pos"
Now i need to have the date like below.
i have just... (7 Replies)
Discussion started by: ckaramsetty
7 Replies
10. Shell Programming and Scripting
Hi All, Need Suggestion, Want to sort a file using awk & sed to get required, output as below, such that each LUN shows correct WWPN and FA port Numbers correctly:
Required output:
01FB 10000000c97843a2 8C 0
01FB 10000000c96fb279 9C 0
22AF 10000000c97843a2 8C 0
22AF 10000000c975adbd ... (10 Replies)
Discussion started by: aix_admin_007
10 Replies
LEARN ABOUT REDHAT
tifffilename
QUERY(3T) QUERY(3T)
NAME
TIFFCurrentRow, TIFFCurrentStrip, TIFFCurrentTile, TIFFCurrentDirectory, TIFFLastDirectory, TIFFFileno, TIFFFileName, TIFFGetMode, TIFF-
IsTiled, TIFFIsByteSwapped, TIFFIsUpSampled, TIFFIsMSB2LSB - query routines
SYNOPSIS
#include <tiffio.h>
uint32 TIFFCurrentRow(TIFF* tif)
tstrip_t TIFFCurrentStrip(TIFF* tif)
ttile_t TIFFCurrentTile(TIFF* tif)
tdir_t TIFFCurrentDirectory(TIFF* tif)
int TIFFLastDirectory(TIFF* tif)
int TIFFFileno(TIFF* tif)
char* TIFFFileName(TIFF* tif)
int TIFFGetMode(TIFF* tif)
int TIFFIsTiled(TIFF* tif)
int TIFFIsByteSwapped(TIFF* tif)
int TIFFIsUpSampled(TIFF* tif)
int TIFFIsMSB2LSB(TIFF* tif)
const char* TIFFGetVersion(void)
DESCRIPTION
The following routines return status information about an open TIFF file.
TIFFCurrentDirectory returns the index of the current directory (directories are numbered starting at 0). This number is suitable for use
with the TIFFSetDirectory routine.
TIFFLastDirectory returns a non-zero value if the current directory is the last directory in the file; otherwise zero is returned.
TIFFCurrentRow, TIFFCurrentStrip, and TIFFCurrentTile, return the current row, strip, and tile, respectively, that is being read or writ-
ten. These values are updated each time a read or write is done.
TIFFFileno returns the underlying file descriptor used to access the TIFF image in the filesystem.
TIFFFileName returns the pathname argument passed to TIFFOpen or TIFFFdOpen.
TIFFGetMode returns the mode with which the underlying file was opened. On UNIX systems, this is the value passed to the open(2) system
call.
TIFFIsTiled returns a non-zero value if the image data has a tiled organization. Zero is returned if the image data is organized in
strips.
TIFFIsByteSwapped returns a non-zero value if the image data was in a different byte-order than the host machine. Zero is returned if the
TIFF file and local host byte-orders are the same. Note that TIFFReadTile(), TIFFReadStrip() and TIFFReadScanline() functions already nor-
mally perform byte swapping to local host order if needed.
TIFFIsUpSampled returns a non-zero value if image data returned through the read interface routines is being up-sampled. This can be use-
ful to applications that want to calculate I/O buffer sizes to reflect this usage (though the usual strip and tile size routines already do
this).
TIFFIsMSB2LSB returns a non-zero value if the image data is being returned with bit 0 as the most significant bit.
TIFFGetVersion returns an ASCII string that has a version stamp for the TIFF library software.
DIAGNOSTICS
None.
SEE ALSO
libtiff(3T), TIFFOpen(3T), TIFFFdOpen(3T)
October 15, 1995 QUERY(3T)