Good evening to you all perl experts
I need your help
I have a very simple script where I´m trying to print a line from status.dat file.
The script will find the line containing "servicestatus", and I want to print the content of the next line.
For example, the file contains this text:... (6 Replies)
How to edit file content at the specific line? For example at below
The things to edit --> This is line 2. And it is below line 1.
This is line 1.
This is line 2. # i want to append some words at this row line. How?
This is line 3. (8 Replies)
Hi,
I am trying to print a specific line in a file through sed or awk. The line number will be passed as a parameter from the previous step. My code looks as below.
TEMP3=`sed -n '$TEMP2p' $FILEPATH/Log.txt`
$TEMP2, I am getting from the previous step which is a numerical value(eg:3).
... (2 Replies)
Hi,
I have urls in my input file like this
http://unix.com/abc/def
http://unix.com/kil/min
I want to use the / as separator and print the last content as another column like this
http://unix.com/abc/def def
http://unix.com/kil/min min
I was using awk -F option and then joining the... (3 Replies)
Hi,
I have a file which contains 2,500,500,432 lines.
Can I know what command I should type in order just print out particular line from the input file?
eg. I just wanna to see what is the contents at line 522,484,612.
Thanks for advice. (3 Replies)
Hi Everyone,
Is there a way I can print specific lines using sed -n '3,3p' file.dat or awk 'FNR==3' file.dat when using variable?
For example, I have this script (get_line.ksh) that accepts line parameter that a user wanted to print in the file.dat.
file.dat
one
two
three
four
... (1 Reply)
Input file :
AAAG TC
AACCCT AACCCT AACCCT AACCCT
TCTG TCTG TCTG AC AC TCTG TCTG AC AC AC
AC AC
AGTG AC
AGTG TCC
Desired output file :
AACCCT AACCCT AACCCT AACCCT
AC AC
I would like to print out the line that share exactly same as the first column data content.
Column one data... (4 Replies)
In the file below I am trying to extract a specific instance of path, if the adjacent plugin": "/rundb/api/v1/plugin/49/. Thank you :).
file
"path": "/results/analysis/output/Home/Auto_user_S5-00580-4-Medexome_65_028/plugin_out/FileExporter_out.52", "plugin": "/rundb/api/v1/plugin/49/",... (8 Replies)
Hi,
I have urls in my input file like this (1 Reply)
Discussion started by: tmonk1
1 Replies
LEARN ABOUT DEBIAN
dublincore::element
DublinCore::Element(3pm) User Contributed Perl Documentation DublinCore::Element(3pm)NAME
DublinCore::Element - Class for representing a Dublin Core element
SYNOPSIS
my $element = DublinCore::Element->new( \%info );
print "content: ", $element->content(), "
";
print "qualifier: ", $element->qualifier(), "
";
print "language: ", $element->language(), "
";
print "scheme: ", $element->scheme(), "
";
DESCRIPTION
DublinCore::Record methods such as element(), elements(), title(), etc return DublinCore::Element objects as their result. These can be
queried further to extract an elements content, qualifier, language, and schema. For a definition of these attributes please see RFC 2731
and <http://www.dublincore.org>.
METHODS
new()
The constructor. Take a hashref of input arguments.
content()
Gets and sets the content of the element.
## extract the element
my $title = $record->element( 'title' );
print $title->content();
## or you can chain them together
print $record->element( 'title' )->content();
qualifier()
Gets and sets the qualifier used by the element.
language()
Gets and sets the language of the content in element.
scheme()
Gets and sets the scheme used by the element.
name()
Gets and sets the element name (title, creator, date, etc).
is_empty()
Gets and sets the "empty" status of an element. This is useful when using DublinCore::Record's element() method.
To see if the record has an creator elements:
if( $record->element( 'creator' )->is_empty ) {
# no creators
}
set()
This function overrides the default set() behavior in order to remove the is_empty flag.
SEE ALSO
* DublinCore::Record
AUTHOR
* Ed Summers <ehs@pobox.com>
* Brian Cassidy <bricas@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2007 by Ed Summers, Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.8.8 2007-11-24 DublinCore::Element(3pm)