Hi,
I am facing an issue with sed in perl. I have a file which has 2 header lines and one trailer line. I need to process the file without these headers and trailer. My file looks like :
File.txt:-
For removing header and trailer from file I am using the following command in perl file:
The problem is, when I am excuting this perl script it is just removing the Headers only and not the trailer from the file.
But when I am directly running this command on command line:
It is running fine and is removing both headers and trailer from the file. Not sure, why the same command is working differently in perl??
Any help would be highly appreciated.
Thanks..
Moderator's Comments:
Please use code tags, thank you
Last edited by Franklin52; 08-18-2010 at 02:28 PM..
Hi All,
I would need to generate Oracle Inster scripts from an excel formatted spreadsheet as follows:
This needs to be stripped as follows:
REC 1, REC 2 etc are the separators of the records ...
I beleive a pearl script can be written for this ... anything useful will be of... (8 Replies)
I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows:
$count = 0;
while ( $count < $#test )
{
`sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`;
`cat 0 >... (2 Replies)
Some text is like this....
<table>This is first text.</table>mouse
<table>This is second text</table>keyboard
<table>This is third text</table>Pad
I need to insert <a></a> between "mouse","keyboard","Pad".
I it possible to do with sed/Perl ? Please help..
The text should look like... (8 Replies)
In a file the content is
13 box google unix.com "he is google" hello "he is unix.com" -
I need to replace each space char with "a" char but not inside the double quoted strings.
So, the output must look like,
13aboxagoogleaunix.coma"he is google"ahelloa"he is unix.com"a-
I tried with ... (9 Replies)
I have a large text csv file that I'm working with. It will look something like this:
D,",E",C
O,"F,",I
O,gh,R
The second column always has a two digit random code (can be numbers, letters or any characters). When one of the characters happens to be a comma, the string is quoted. I want to... (5 Replies)
Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect.
Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is
redirected to welcome page.
My... (3 Replies)
Greetings!
I've run into this before; and am having a spot of trouble trying to figure out the way that Perl would prefer the following example syntax to be formed:#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
`sed -i 's/Hi Mom!\|Hi Dad!/Bye Everyone!/I' ./test.txt`;Perl... (5 Replies)
I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore.
Here is what 's happening:
* I wanted to remove lines containing digits so I used this... (25 Replies)
I am having trouble re-writing this sed code
sed -nr 's/.*del(+)ins(+).*NC_0{4}(+).*g\.(+)_(+).*/\3\t\4\t\5\t\1\t\2/p' C:/Users/cmccabe/Desktop/Python27/out_position.txt > C:/Users/cmccabe/Desktop/Python27/out_parse.txt in perl Basically, what the code does is parse text from two fields... (12 Replies)
Discussion started by: cmccabe
12 Replies
LEARN ABOUT SUSE
image::exiftool::afcp
Image::ExifTool::AFCP(3) User Contributed Perl Documentation Image::ExifTool::AFCP(3)NAME
Image::ExifTool::AFCP - Read/write AFCP trailer
SYNOPSIS
This module is used by Image::ExifTool
DESCRIPTION
This module contains definitions required by Image::ExifTool to extract information from the AFCP trailer. Although the AFCP specification
is compatible with various file formats, ExifTool currently only processes AFCP in JPEG images.
NOTES
AFCP is a specification which allows meta information (including IPTC) to be appended to the end of a file.
It is a poorly designed protocol because (like TIFF) it uses absolute offsets to specify data locations. This is a huge blunder because it
makes the AFCP information dependent on the file length, so it is easily invalidated by image editing software which doesn't recognize the
AFCP trailer to fix up these offsets when the file length changes. ExifTool will attempt to fix these invalid offsets if possible.
Scanning for AFCP information may be time consuming, especially when reading from a sequential device, since the information is at the end
of the file. In these instances, the ExifTool FastScan option may be used to disable scanning for AFCP information.
AUTHOR
Copyright 2003-2010, Phil Harvey (phil at owl.phy.queensu.ca)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
REFERENCES
<http://www.tocarte.com/media/axs_afcp_spec.pdf>
SEE ALSO
"AFCP Tags" in Image::ExifTool::TagNames, Image::ExifTool(3pm)perl v5.12.1 2010-01-04 Image::ExifTool::AFCP(3)