Hi all
I need to input values in a .csv file into my Oracle table running in Unix, I wonder what would be the command to do so...
The values are recorded in an excel file and I tried using a formatted text file to do so but failed because one of the field is simply too large to fit in the... (5 Replies)
Hi all
I need to input values in a .csv file into my Oracle table running in Unix, I wonder what would be the command to do so...
The values are recorded in an excel file and I tried using a formatted text file to do so but failed because one of the field is simply too large to fit in the... (4 Replies)
I have file like this
FileA:
abc , "helloworld" , america
def,asia, japan
ghi, africa, ipl
Output Needed:
abc,"helloworld",america
def,asia,japan
ghi,africa,ipl
I would like to implement using awk.
I want to trim each field for its leading and trailing spaces. (7 Replies)
I have a file like below. How can I add a new value after moss separated by a comma. This adding script should work in such a way that each time i pass a value it should be added one after the other separated by commas.
hru:122:
hello:123:john,philip,mary,kp,moss
hi:124:
bye:125:
Can... (7 Replies)
Using awk or sed, I'd like to remove leading spaces after a comma and before a right justified number in field 6. Sounds simple but I can't find a solution. Each field's formatting must stay intact.
Input:
40,123456-02,160,05/24/2012,02/13/1977, 10699.15,0
Output:... (5 Replies)
I have a file with the below content
a = test1
b = test2
a = test3
b= test4
c = test6
b = test5
d = test7
d = test9
Need the output to be as follows
a = test1,test3
b = test2, test5
c = test6
d = test7, test9 (4 Replies)
Hi Experts
I have an escape seperated fields in the unix file. And in the below format file I need to extract the first column. Please help its urgent.
cat -v op.dat | head
24397028^
I want to extract the file in below format ( with only first column )
24397028
2439707
thanks.
... (6 Replies)
Discussion started by: neha_suri06
6 Replies
LEARN ABOUT DEBIAN
hash::case
Hash::Case(3pm) User Contributed Perl Documentation Hash::Case(3pm)NAME
Hash::Case - base class for hashes with key-casing requirements
INHERITANCE
Hash::Case
is a Tie::StdHash
Hash::Case is extended by
Hash::Case::Lower
Hash::Case::Preserve
Hash::Case::Upper
SYNOPSIS
use Hash::Case::Lower;
tie my(%lchash), 'Hash::Case::Lower';
$lchash{StraNGeKeY} = 3;
print keys %lchash; # strangekey
DESCRIPTION
Hash::Case is the base class for various classes which tie special treatment for the casing of keys. Be aware of the differences in
implementation: "Lower" and "Upper" are tied native hashes: these hashes have no need for hidden fields or other assisting data structured.
A case "Preserve" hash will actually create three hashes.
The following strategies are implemented:
o Hash::Case::Lower (native hash)
Keys are always considered lower case. The internals of this module translate any incoming key to lower case before it is used.
o Hash::Case::Upper (native hash)
Like the ::Lower, but then all keys are always translated into upper case. This module can be of use for some databases, which do
translate everything to capitals as well. To avoid confusion, you may want to have you own internal Perl hash do this as well.
o Hash::Case::Preserve
The actual casing is ignored, but not forgotten.
METHODS
Constructors
$obj->addHashData(HASH)
Add the data of a hash (passed as reference) to the created tied hash. The existing values in the hash remain, the keys are adapted to
the needs of the the casing.
$obj->addPairs(PAIRS)
Specify an even length list of alternating key and value to be stored in the hash.
$obj->setHash(HASH)
The functionality differs for native and wrapper hashes. For native hashes, this is the same as first clearing the hash, and then a
call to addHashData(). Wrapper hashes will use the hash you specify here to store the data, and re-create the mapping hash.
tie(HASH, TIE, [VALUES,] OPTIONS)
Tie the HASH with the TIE package which extends Hash::Case. The OPTIONS differ per implementation: read the manual page for the
package you actually use. The VALUES is a reference to an array containing key-value pairs, or a reference to a hash: they fill the
initial hash.
example:
my %x;
tie %x, 'Hash::Case::Lower';
$x{Upper} = 3;
print keys %x; # 'upper'
my @y = (ABC => 3, DeF => 4);
tie %x, 'Hash::Case::Lower', @y;
print keys %x; # 'abc' 'def'
my %z = (ABC => 3, DeF => 4);
tie %x, 'Hash::Case::Lower', \%z;
SEE ALSO
This module is part of Hash-Case distribution version 1.02, built on March 09, 2012. Website: http://perl.overmeer.net/hash-case/
LICENSE
Copyrights 2002-2003,2007-2012 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See
http://www.perl.com/perl/misc/Artistic.html
perl v5.14.2 2012-03-09 Hash::Case(3pm)