Hello,
I am trying to match a string between line one and line two with in the file. But I dont want to search based on the given filename. Instead I want to search for all available files in the specific directory. Please help me on the above. (2 Replies)
Hi Guys,
I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same.
can anyone of you please let me know how to go about it ? (8 Replies)
Hi all,
My need is:
To list out all the java / jsp files having System.out.println in my project.
I need the output as:
/home/me/project/file1.java
somejavacode
somejavacode
System.out.println("something");
somejavacode
somejavacode
somejavacode
/home/me/project/file2.java... (8 Replies)
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB and add/replace... (1 Reply)
Dear All
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB... (5 Replies)
Hi,
Need your help for this scripting issue I have. I am not really good at this, so seeking your help.
I have a file looking similar to this:
Hello, i am human and name=ABCD.
How are you?
Hello, i am human and name=PQRS.
I am good.
Hello, i am human and name=ABCD.
Good bye.
Hello, i... (12 Replies)
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file.
Please use CODE tags as... (7 Replies)
I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this.
string(Scenario 1)- user::r--,user::ourfrd:r--
String(Scenario 2)- user::r--
File
****
# file: /local/Desktop/myfile
# owner: me
# group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
LEARN ABOUT DEBIAN
template::plugin::yaml
Template::Plugin::YAML(3pm) User Contributed Perl Documentation Template::Plugin::YAML(3pm)NAME
Template::Plugin::YAML - Plugin interface to YAML
SYNOPSIS
[% USE YAML %]
[% YAML.dump(variable) %]
[% YAML.dump_html(variable) %]
[% value = YAML.undump(yaml_string) %]
[% YAML.dumpfile(filename, variable) %]
[% value = YAML.undumpfile(filename) %]
DESCRIPTION
This is a simple Template Toolkit Plugin Interface to the YAML module. A YAML object will be instantiated via the following directive:
[% USE YAML %]
As a standard plugin, you can also specify its name in lower case:
[% USE yaml %]
METHODS
These are the methods supported by the YAML object.
dump( @variables )
Generates a raw text dump of the data structure(s) passed
[% USE Dumper %]
[% yaml.dump(myvar) %]
[% yaml.dump(myvar, yourvar) %]
dump_html( @variables )
Generates a dump of the data structures, as per "dump", but with the characters <, > and & converted to their equivalent HTML entities,
spaces converted to and newlines converted to <br>.
[% USE yaml %]
[% yaml.dump_html(myvar) %]
undump( $string )
Converts a YAML-encoded string into the equivalent data structure. Here's a way to deep-copy a complex structure by completely serializing
the data.
[% USE yaml;
yaml_string = yaml.dump(complex_data_structure);
complex_copy = yaml.undump(yaml_string);
%]
dumpfile( $file, @variables )
Converts the data to YAML encoding, and dumps it to the specified filepath.
[% USE yaml; yaml.dumpfile(".storage", my_data) %]
undumpfile( $file )
Loads the YAML-encoded data from the specified filepath
[% USE yaml; my_data = yaml.undumpfile(".storage") %]
AUTHORS
Richard Clamp <richardc@unixbeard.net>, with undump, undumpfile, and dumpfile implementation by Randal L. Schwartz <merlyn@stonehenge.com>
based on Simon Matthews' Template::Plugin::Dumper
COPYRIGHT
Copyright 2003, 2008 Richard Clamp All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Template::Plugin::Dumper
perl v5.10.0 2008-12-15 Template::Plugin::YAML(3pm)