12-19-2014
Hello Abhilash,
Could you please provide some test input for same.
Thanks,
R. Singh
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a situation to append spaces to end of first record (header)and last record (footer) based on second record length.
The first record length is always 20.The second record will be different for different files.I have to append spaces for the first line based on second record... (2 Replies)
Discussion started by: ammu
2 Replies
2. Shell Programming and Scripting
I have file called xx
Now i want to rename this file as xxYYYYMMDD_HHMIAM.xls
Here is my code..
export DATE1=`date +%Y%m%d`
mv xx xx$DATE1
This code renames as xxYYYYMMDD
Now how can i append HHMIAM at the end of the file?
Any help is appreciated... (3 Replies)
Discussion started by: govindts
3 Replies
3. Shell Programming and Scripting
Hello, I wanted to append 'XYZ' at the end of the text file. How can i do this?
I searched the forums and i am not getting what i want. Any help is highly appreciated. Thanks (2 Replies)
Discussion started by: govindts
2 Replies
4. Shell Programming and Scripting
I have searched the forms and I can not find info on appending each line of one file to the same line of another file. I know that I can cat one file to another or append the 2nd file to the end of the 1st but not quite sure how to append one line of data to another. For example
File 1 has ... (2 Replies)
Discussion started by: scw132
2 Replies
5. UNIX for Dummies Questions & Answers
I keep trying to append some astrix to the end of a line, but it keeps overwriting at the front of the line.
These are the originals
Fred Fardbarkle:674-843-1385:20 Parak Lane, Duluth, MN 23850:4/12/23:780900
Fred Fardbarkle:674-843-1385:20 Parak Lane, Duluth, MN 23850:4/12/23:780900
... (5 Replies)
Discussion started by: DrSammyD
5 Replies
6. Shell Programming and Scripting
can anyone tell me please ......how to append a new field at the end of a file with the help of sed or some other command in bourne shell (8 Replies)
Discussion started by: amitpta
8 Replies
7. UNIX for Dummies Questions & Answers
I know that windows uses CRLF as a end of line character while Unix uses LF. But visually i could not see any difference in files while creating on either of plat forms.
CR (Carriage Return) means to bring cursor to beginning of line while LF (Line feed) means to bring cursor to next line... (5 Replies)
Discussion started by: sarbjit
5 Replies
8. UNIX for Dummies Questions & Answers
Hi Guys,
I have serveral directories like this:
(2013) blablabla(blabla) - blabla (blabla)
or
(1997) blablabla(blabla) - blabla (blabla)
and have to rename them to something like that:
blablabla(blabla) - blabla (blabla) (2013)
and
blablabla(blabla) - blabla (blabla) (1997)
Easy... (2 Replies)
Discussion started by: Nateshift
2 Replies
9. Shell Programming and Scripting
Hi,
Here i'm using a awk inside bash script to validate the datafile by referring to the configuration file(schema file).
Here the validation check is done for datatype, field length and null values.
Once the validation is done on data file the error records are moved to the bad file. So... (22 Replies)
Discussion started by: shree11
22 Replies
10. UNIX for Dummies Questions & Answers
I have a text file in which all records end with pipe character and newline, but a few do not have a pipe at the end.
Something like this
1|John|32|US|
2|Matt|35|UK
3|Rex|36|EU|
So in the above example the second line does not have a pipe at the end
My requirement is to append a... (5 Replies)
Discussion started by: abhilashnair
5 Replies
LEARN ABOUT DEBIAN
zirephoto
ZirePhoto(3pm) User Contributed Perl Documentation ZirePhoto(3pm)
NAME
Palm::ZirePhoto - Handler for Palm Zire71 Photo thumbnail databases.
SYNOPSIS
use Palm::ZirePhoto;
DESCRIPTION
The Zire71 PDB handler is a helper class for the Palm::PDB package. It parses Zire71 Photo thumbnail databases (and, hopefully, Tungsten
Photo databases). Actual photos are separate databases and must be processed separately.
This database is currently only capable of reading.
AppInfo block
The AppInfo block begins with standard category support. See Palm::StdAppInfo for details.
Records
Records may contain no data fields. This occurs when the record has been marked deleted on the Palm, presumably in order to save space
(Photo has no provision for archiving when deleting and the separate database storage for the actual images would make it pointless
anyways).
$record = $pdb->{records}[N]
$record->{'width'}
$record->{'height'}
$record->{'size'}
The actual JPEG images dimensions and (compressed) file size.
$record->{'thumb'}
The thumbnail is a very small (max size approx 84x84) JPEG format image.
$record->{'name'}
Image name. Appending ".jpg" to this will give the database name of the actual image data.
$record->{'time1'}
$record->{'time2'}
Unix epoch time of when the image was last modified ("time1") and when it was created ("time2").
Photo Databases
Actual photos are stored in separate databases. Each record is preceded by an 8 byte header that describes it a) as a data block (DBLK) and
b) the size of the block. Records are generally 4k, except for the last. To convert a Photo database to a JPEG image, one would do
something like:
use Palm::Raw;
my $pdb = new Palm::PDB;
$pdb->Load( "image.jpg.pdb" );
open F, ">image.jpg";
for( @{$pdb->{records}} ) {
print F substr($_->{'data'}, 8);
}
close F;
Notes are stored at the end of the JPEG image. Use "ParseNote" to get it.
METHODS
Handling Palm photos can be a bit complicated. Some helper methods are exported to make some special cases a bit easier.
ParseNote
my $photo = read_jpeg_file( "image.jpg" );
my $note = Palm::ZirePhoto::ParseNote($photo);
print "Note: $note" if defined $note;
The Palm photo application stores user notes at the end of the JPEG file itself. This method will extract that note and return it. "undef"
is returned if the note is unavailable.
ParseAlbum
my $album = slurp("/DCIM/Unfiled/Album.db");
my @records = Palm::ZirePhoto::ParseAlbum( $album );
print $_->{name},"
" for( @records );
Photos on memory cards are stored in subdirectories of "/DCIM". The meta-data for these images are stored in "Album.db" files under each
category directory. This method will parse out the meta-data into an array of records similar to those returned by "ParseRecord". Thumbnail
information, however, is not available.
SOURCE CONTROL
The source is in Github:
http://github.com/briandfoy/p5-Palm/tree/master
AUTHOR
Alessandro Zummo, "<a.zummo@towertech.it>"
Currently maintained by brian d foy, "<bdfoy@cpan.org>"
SEE ALSO
Palm::PDB(3)
Palm::StdAppInfo(3)
perl v5.10.1 2010-03-07 ZirePhoto(3pm)