Hi guys i have written a script which takes the options given to him and execute itself accordingly.
for example
if a script name is doctortux then executing doctortux without option should made doctortux to be executed in automatic mode i.e. doctortux -a
or if a doctortux is needed to run in... (4 Replies)
My requiremeny is as follows,
I have two files
file a
A BONES RD,NHILL,3418,VIC
37TH PARALLEL RD,DEEP LEAD,3385,VIC
4 AK RD,OAKEY,4401,QLD
A & J FARRS RD,BARMOYA,4703,QLD
A B PATTERSON DR,ARUNDEL,4214,QLD
A BLAIRS RD,BUCKRABANYULE,3525,VIC
file b
A BONES... (12 Replies)
hi guys
i have this very messy script, that looks in /var/log/messages.all for an error and reports if it finds the key works
how can i get it to look at more then one file, i.e /var/log/message.all *
so it looks in old logs as well
thanks
exit 0 if (isRenderNode(hostname));
my... (4 Replies)
Platforms : Solaris 10 and RHEL 5.6
I always get double quotes , single quotes and asteriks mixed up for find, ls and grep commands.
The below commands retrieve the correct results. But , unders stress , I get all these mixed up :mad: .So, i wanted to get a clear picture.
Please check if... (7 Replies)
Platform: AIX 6.1/ksh
Question1.
I want to grep for the string "CUSTOM_PKMS" in all the files in server except those files with extensions .dbf , .ctl and .dmp
I started running the following command but it is taking too long because there are lots of .dbf , .ctl and .dmp files in this... (6 Replies)
Hi all,
actually i have a lot of IP addresses on multiple .xml files on my folder,
my tag on xml files are like this,
<db-url>jdbc:oracle:thin:@10.100.5.56:1521:DWH01</db-url>
i actually can print only the IP addresses
awk -F"" '/url/ { print $3 }' *.xml
10.100.5.56
i would like to grep... (2 Replies)
Hi Experts,
I'm writing script to find out last files and its modified date - unfortunately am having problem with the below script.
Error message:
"grep: sales.txt: No such file or directory"
#!/bin/bash
var=1
var1=`awk '{n++} END {print n}' sales.txt`
while ]
do
prod=$var... (6 Replies)
Hi everyone
I am trying to write a script to check if file systems are mounted, and also validate the permission; then do a whole bunch of other things. I am facing a problem with grep. For example, if the mountpoints are:
/dev/XYZ_lv /abc/XYZ jfs2 Nov 25 20:36... (4 Replies)
I have a need to grep a large number of files, but only display the first result from each file. I have tried to use grep, but am not limited to it. I can use perl and awk as well. Please help! (9 Replies)
I have a text file (allWords.txt), that I would like to search through. Here is a snippet of what it looks like...
a
aah
aahed
aahing
aahs
aardvark
aardvarks
aardwolf
ab
abaci
aback
abacus
abacuses
abaft
......
I would like to use the grep search to search, line by line, for... (8 Replies)
Discussion started by: blackvelvet
8 Replies
LEARN ABOUT DEBIAN
text::csv::encoded::coder::base
Text::CSV::Encoded::Coder::Base(3pm) User Contributed Perl Documentation Text::CSV::Encoded::Coder::Base(3pm)NAME
Text::CSV::Encoded::Coder::Base - Interface for Text::CSV::Encoded coder base class
SYNOPSIS
package Text::CSV::Encoded::Coder::YourCoder;
use base qw( Text::CSV::Encoded::Coder::Base );
sub decode {
...
}
sub encode {
...
}
sub upgrade {
...
}
sub decode_fields_ref {
...
}
sub encode_fields_ref {
...
}
DESCRIPTION
This module is used by Text::CSV::Encoded internally.
INTERFACS
decode
( $self, $encoding, $str ) = @_;
....
return $decoded_str;
Takes an encoding and a CSV string. It must return a Perl string decoded in $encoding. In Perl 5.8 or later, if $enc is "undef" or false,
the encoding should be utf8.
encode
( $self, $encoding, $str ) = @_;
....
return $encoded_str;
Takes an encoding and a Perl string. It must return a CSV string encoded in $encoding. In Perl 5.8 or later, if $enc is "undef" or false,
the encoding should be utf8.
decode_fields_ref
( $self, $encoding, $arrayref ) = @_;
Takes an encoding and an array reference. It must decoded each array entries in $encoding.
encode_fields_ref
( $self, $encoding, $arrayref ) = @_;
Takes an encoding and an array reference. It must encoded each array entries in $encoding.
upgrade
( $self, $str ) = @_;
In Perl 5.8 or later, it is expected to do "utf8::upgrade" against $str. In older versions, this method may be meaningless and there is no
need to implement. See to utf8.
encode_check_value
Setter/Getter for an argument passing to encode.
$coder->encode_check_value( Encode::FB_PERLQQ );
decode_check_value
Setter/Getter for an argument passing to decode.
$coder->encode_check_value( Encode::FB_PERLQQ );
EXAMPLE
Use with Jcode.
package Text::CSV::Encoded::Coder::Jcode;
use strict;
use base qw( Text::CSV::Encoded::Coder::Base );
use Jcode ();
my $Jcode = Jcode->new;
my %alias = (
'shiftjis' => 'sjis',
'euc-jp' => 'euc',
'sjis' => 'sjis',
'euc' => 'euc',
);
sub decode {
my ( $self, $encoding, $str ) = @_;
my $enc = $alias{ $encoding };
$Jcode->set( $str, $enc )->euc;
}
sub encode {
my ( $self, $encoding, $str ) = @_;
my $enc = $alias{ $encoding };
$Jcode->set( $str, 'euc' )->$enc();
}
sub decode_fields_ref {
my ( $self, $encoding, $arrayref ) = @_;
my $enc = $alias{ $encoding };
for ( @$arrayref ) {
$_ = $Jcode->set( $_, $enc )->euc;
}
}
sub encode_fields_ref {
my ( $self, $encoding, $arrayref ) = @_;
my $enc = $alias{ $encoding };
for ( @$arrayref ) {
$_ = $Jcode->set( $_, 'euc' )->$enc();
}
}
AUTHOR
Makamaka Hannyaharamitu, <makamaka[at]cpan.org>
COPYRIGHT AND LICENSE
Copyright 2008-2010 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2010-04-26 Text::CSV::Encoded::Coder::Base(3pm)