01-24-2007
listing sequential files as one group...
Hi,
I posted this over at Macnn and was redirected here... I'm not a unix programmer at all, but I have some backup if needed. Thanks in advance for any input.
Is there a command for the osX terminal that will list sequentially numbered groups of file as one line instead of individually, while listing other files and directories correctly?
Meaning that a group of files:
image.001.tif
image.002.tif
image.003.tif
image.004.tif
image.005.tif
would be listed as
image.001-005.tif
and a dir with other files and dirs:
image.001.tif
image.002.tif
image.003.tif
image.004.tif
image.005.tif
dir01/
dir02/
imageB.tif
in it would be:
image.001-005.tif
dir01/
dir02/
imageB.tif
?
Wold love to have this...
Thanks,
KM
10 More Discussions You Might Find Interesting
1. Programming
hi,
I want to implement indexed sequential access method in my
flat file,
Any idea other than INFORMIX C-ISAM library, because it is not free ware,
Any Freeware available? (0 Replies)
Discussion started by: vrkiruba
0 Replies
2. UNIX for Dummies Questions & Answers
Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories.
The following command also shows the files but I only want to see the directories.
ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies
3. UNIX for Dummies Questions & Answers
I know there is a "groups" command to list the groups a user belongs to, but how about the opposite? Is there a standard command to find out which users belong to a particular group? (2 Replies)
Discussion started by: ovaska
2 Replies
4. Programming
We have to convert a sequential file to a 80 char line sequential file (HP UX platform).The sequential file contains special characters. which after conversion of the file to line sequential are getting coverted into "new line" or "tab" and file is getting distorted. Is there any way to read these... (2 Replies)
Discussion started by: Rajeshsu
2 Replies
5. UNIX for Dummies Questions & Answers
Hi ,
I am having 3 files as
FILE1
1
2
3
FILE2
4
5
6
FILE3
7
8
9
I want to merge thes file such that the resultnt file should be as (1 Reply)
Discussion started by: arunkumar_mca
1 Replies
6. UNIX for Advanced & Expert Users
Hello,
When listing the file systems (using ls -ltr) , if the group names are longer the group name is getting truncated.
Can someone help with the script which would display the truncated group name?
I appreciate if someone could help in this regard. (1 Reply)
Discussion started by: mike12
1 Replies
7. Programming
Writing a Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX
I have over the years come across the same issue a couple of times, and it normally is that the read speed on SAN is absolutely atrocious when doing non-sequential I/O to the disks. Problem being of... (7 Replies)
Discussion started by: vrghost
7 Replies
8. Shell Programming and Scripting
I can rename a file with sequential numbers from 1 to N with this script:
num=1
for file in *.dat;do
mv "$file" "$(printf "%u" $num).txt"
let num=num+1
done
The script begins with renaming a some.dat file to 1.dat.txt and goes on sequentially renaming other DAT files to... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
9. Shell Programming and Scripting
1)In a particualr path i have a set of inputfiles like
path:/defaultmis/MonthlyLoads/INFA_EXPORT_022013/map*
example:
1)map_de
2)map_cod
3)map_feg
........and so on
in above path there wil be nearly 15 to 20 files starting with map and in other path i have another file input file... (4 Replies)
Discussion started by: katakamvivek
4 Replies
10. Shell Programming and Scripting
I have c program that I run like this:
./a.out t1
And my test files look like this all the way up to 100:
t1
t2
t3
Is there a way to run this more efficiently so I don't have to hit up and change the number every time? (4 Replies)
Discussion started by: cokedude
4 Replies
LEARN ABOUT REDHAT
tiffcurrentrow
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)