Sponsored Content
Full Discussion: need Script logic
Top Forums Shell Programming and Scripting need Script logic Post 302484726 by JSKOBS on Monday 3rd of January 2011 02:32:36 AM
Old 01-03-2011
need Script logic

Hi, i have a file called sc.txt
Code:
cat sc.txt
ecf0183.sh
ecf1002.sh
ecf1011.sh
ecf1020.sh

another file callled All.csv
Code:
Type,S Name,Mem Lib,S Id,S Table,App,Group
Reg sch,ecf1002,Link from 1,pcor1,EER,ecf1002.sh,ECF-D-LND-AMZ-A
Reg sch,ecf1002a,Link from 2,pcor1,EER,ecf1002.sh,ECF-D-LND-AX-A
Reg sch,ecf1011ab,Link from 4,pcor1,EER,ecf1011.sh,EW-G-LND-AX-A
Reg sch,ecf1020rt,Link from 9,pcor1,EER,ecf1020.sh,EW-G-JYD-GEX-D

i need to take the sc.txt as a reference and need to compare with All.csv and then need to create a file as below. please help me with the code

Code:
sc              S Name   S id   Group
ecf0183.sh 
ecf1002.sh ecf1002    pcor1 ECF-D-LND-AMZ-A
                ecf1002a  pcor1 ECF-D-LND-AX-A
ecf1011.sh ecf1011ab pcor1 EW-G-LND-AX-A
ecf1020.sh ecf1020rt  pcor1 EW-G-JYD-GEX-D


Moderator's Comments:
Mod Comment Please use code tags when posting data and code samples!

Last edited by Franklin52; 01-03-2011 at 04:36 AM..
 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script logic

Please help me to write the following script. 1) Input files will be in Test directory. (Test/YYYY/MM) folders (Ex: 1) 2010/ 01 2) 2011/05) The file name will be Testfile1_6676543218_Axxxxxxyyyyyzzzzzzzzzzzzzzzzzz.pdf.gz 2) The compare file will be in /tmp directory. (/tmp/comparefile.txt). The... (6 Replies)
Discussion started by: mnjx
6 Replies

2. Shell Programming and Scripting

Need script logic

i have two csv files (rates.csv, reference.csv) as below. rates.csv contains Code, respective Zone details rates.csv ---------- 23,38Nhava 45,37NEWYORK 89,SHILANG 71,ROBACCA reference.csv contains all Zone details reference.csv ------------- 37Newyork robacca 38Nhava... (5 Replies)
Discussion started by: p_satyambabu
5 Replies
Plack::Session::Store::File(3pm)			User Contributed Perl Documentation			  Plack::Session::Store::File(3pm)

NAME
Plack::Session::Store::File - Basic file-based session store SYNOPSIS
use Plack::Builder; use Plack::Middleware::Session; use Plack::Session::Store::File; my $app = sub { return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ]; }; builder { enable 'Session', store => Plack::Session::Store::File->new( dir => '/path/to/sessions' ); $app; }; # with custom serializer/deserializer builder { enable 'Session', store => Plack::Session::Store::File->new( dir => '/path/to/sessions', # YAML takes it's args the opposite order serializer => sub { YAML::DumpFile( reverse @_ ) }, deserializer => sub { YAML::LoadFile( @_ ) }, ); $app; }; DESCRIPTION
This implements a basic file based storage for session data. By default it will use Storable to serialize and deserialize the data, but this can be configured easily. This is a subclass of Plack::Session::Store and implements its full interface. METHODS
new ( %params ) The %params can include dir, serializer and deserializer options. It will check to be sure that the dir is writable for you. dir This is the directory to store the session data files in, if nothing is provided then "/tmp" is used. serializer This is a CODE reference that implements the serialization logic. The CODE ref gets two arguments, the $value, which is a HASH reference to be serialized, and the $file_path to save it to. It is not expected to return anything. deserializer This is a CODE reference that implements the deserialization logic. The CODE ref gets one argument, the $file_path to load the data from. It is expected to return a HASH reference. BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. AUTHOR
Stevan Little <stevan.little@iinteractive.com> COPYRIGHT AND LICENSE
Copyright 2009, 2010 Infinity Interactive, Inc. <http://www.iinteractive.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-07-27 Plack::Session::Store::File(3pm)
All times are GMT -4. The time now is 11:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy