10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have one file with below entry. There are multiple entries, but for sample I used just three lines.
my requirment is to create a script by which it will pull only those entries which modification time is greater than 2 weeks (or 15 days). if I run script today, it will compare date from today... (4 Replies)
Discussion started by: anshu ranjan
4 Replies
2. UNIX for Dummies Questions & Answers
Hi everyone,
I've got a file that looks like this:
uid{508}pid{22224}pname{/PPROGRAM/pprgramx -profile:LIVE -serv:as ...
I want to pull the value of pid between the curly braces, or 22224 in this example. pid is always the second pair of curly braces, but the length of the number is... (7 Replies)
Discussion started by: Scottie1954
7 Replies
3. Shell Programming and Scripting
Experts,
You all have been very supportive of me so far & Im thankful for it.
I need to extract data between two sets of parenthesis and also between quotes.
cat LOGFILE | grep 'number wasnt' | head -2
I. 2011/04/14 01:12:03. process(130) Deleting Text on line 11... (9 Replies)
Discussion started by: OMLEELA
9 Replies
4. Shell Programming and Scripting
Hi,
I am trying to pull out lines from logs between two dates, the logs has lines like this :
conn=552 op=3 msgId=17228 - RESULT err=0 tag=97 nentries=0 etime=0 dn="cn=amldapuser,ou=dsame u
sers,dc=abc,dc=com"
conn=553 op=-1 msgId=-1 - fd=34 slot=34 LDAP connection from 52.99.164.14 to... (4 Replies)
Discussion started by: john_prince
4 Replies
5. UNIX for Dummies Questions & Answers
We have a cluster of 3 web servers. I'll be updating a single master server and copying info to the other 2 slave servers. What's the best way of synching all of them? Run rsync on each of the slave servers to pull the updates from the master? Or run rsync on the master to push the updates to the... (1 Reply)
Discussion started by: gaspol
1 Replies
6. Shell Programming and Scripting
I'm new to shell scripting and am trying to write a small script that pulls a substring out of a file that has a few lines of text in it. The file will eventually have a lot of text, I just put a few lines in it for testing purposes.
Anyway, this is what I have so far...
#!/bin/ksh
... (4 Replies)
Discussion started by: enator45
4 Replies
7. Shell Programming and Scripting
Hello,
I cant get the perl script to pull the information from
Sark DNS 4.X Options
ACL Templates=
and other=
Can someone look at the script to see why and fix it please.
FYI..Under Sark DNS 4.x ACL Templates= and other= has an indent/tab, not sure if thats the reason my the script... (24 Replies)
Discussion started by: richsark
24 Replies
8. UNIX for Dummies Questions & Answers
I tried this and it works for the most part, but if the date is 20090301, it displays 20090300.
YESTERDAY=$((`date +%Y%m%d` -1)) (2 Replies)
Discussion started by: cards0622
2 Replies
9. UNIX for Dummies Questions & Answers
Hi Frnds
I Want to pull xml's from logs based on the below condition.In each log having so many xml's it's taking so much of time to search all logs manually...can u please provide solution
USER:ECMINT CONV:GETARPLNICHUBTST
<CardNbr>376703134104004</CardNbr>
</Envelope>
Response XML:... (3 Replies)
Discussion started by: pb18798
3 Replies
10. Shell Programming and Scripting
Hello
I have 2 Linux machines with a zip file residing on one of them
I am using putty to connect to my Linux files
Is there a way to copy the zip file from one Linux machine to the second
Using the putty textual interface?
If I had a visual interface, maybe I could have opened a browser,... (5 Replies)
Discussion started by: jasongr
5 Replies
CGI::FormBuilder::Source(3pm) User Contributed Perl Documentation CGI::FormBuilder::Source(3pm)
NAME
CGI::FormBuilder::Source - Source adapters for FormBuilder
SYNOPSIS
# Define a source adapter
package CGI::FormBuilder::Source::Whatever;
sub new {
my $self = shift;
my $class = ref($self) || $self;
my %opt = @_;
return bless \%opt, $class;
}
sub parse {
my $self = shift;
my $file = shift || $self->{source};
# open the file and parse it, or whatever
my %formopt;
open(F, "<$file") || die "Can't read $file: $!";
while (<F>) {
# ... do stuff to the line ...
$formopt{$fb_option} = $fb_value;
}
# return hash of $form options
return wantarray ? %formopt : \%formopt;
}
DESCRIPTION
This documentation describes the usage of FormBuilder sources, as well as how to write your own source adapter.
An external source is invoked by using the "source" option to the top-level "new()" method:
my $form = CGI::FormBuilder->new(
source => 'source_file.conf'
);
This example points to a filename that contains a file following the "CGI::FormBuilder::Source::File" layout. Like with the "template"
option, you can also specify "source" as a reference to a hash, allowing you to use other source adapters:
my $form = CGI::FormBuilder->new(
fields => @fields,
source => {
type => 'File',
source => '/path/to/source.conf',
}
);
The "type" option specifies the name of the source adapter. Currently accepted types are:
File - CGI::FormBuilder::Source::File
In addition to one of these types, you can also specify a complete package name, in which case that module will be autoloaded and its
"new()" and "parse()" routines used. For example:
my $form = CGI::FormBuilder->new(
fields => @fields,
source => {
type => 'My::Source::Module',
somefile => '/path/to/source.conf',
}
);
All other options besides "type" are passed to the constructor for that source module verbatim, so it's up to you and/or the source module
on how these additional options should be handled.
SEE ALSO
CGI::FormBuilder, CGI::FormBuilder::Source::File,
REVISION
$Id: Source.pm 100 2007-03-02 18:13:13Z nwiger $
AUTHOR
Copyright (c) Nate Wiger <http://nateware.com>. All Rights Reserved.
This module is free software; you may copy this under the terms of the GNU General Public License, or the Artistic License, copies of which
should have accompanied your Perl kit.
perl v5.14.2 2011-09-16 CGI::FormBuilder::Source(3pm)