CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
creating wrapper ksh in perl

 



edrew04
New User

Jan 25, 2015, 1:43 AM

Post #1 of 3 (2719 views)
creating wrapper ksh in perl Can't Post

 

Hi can you help me on creating a perl code for a ksh wrapper a wrapper is a script that gets a csv file of a certain path then formats it to become another readable csv format example:

AMS.csv

Code
1,Go,Manuel,V.,1/22/2015,8:30AM,5:30PM,1001  
2,Calinisan,Peter,S.,1/22/2015,8:30AM,5:30PM,1002
3,Sioting,Michael,S.,1/22/2015,8:30AM,5:30PM,1003


After running the ksh wrapper it should become like this:
PPS.csv

Code
2002,Go,Manuel,V.,1/22/2015,8:30AM,5:30PM,IT  
2001,Calinisan,Peter,S.,1/22/2015,8:30AM,5:30PM,HR
2003,Sioting,Michael,S.,1/22/2015,8:30AM,5:30PM,PURCHASING


here are my ff file names:




Code
WRAPPER.KSH  
./EXPORT_AMS.KSH -MOVE FROM SOURCE TO OPS FOLDER

./TRANSFORM_AMS_PPS.KSH - transform AMS format to PPS

./IMPORT_PPS.KSH - MOVE FROM OPS TO DEST WRAPPER


TRANSFORM AMS.CSV TO PPS.CSV
AMS ---> PPS


FishMonger
Veteran / Moderator

Jan 25, 2015, 8:54 AM

Post #2 of 3 (2712 views)
Re: [edrew04] creating wrapper ksh in perl [In reply to] Can't Post

So, you want a perl script as a wrapper to a ksh script which is a wrapper for some other script?

Wow, you sure like to make things more complicated than they need to be.

Why not just have 1 perl script that does everything? Doing so would be cleaner, more efficient, less error prone, and easier to maintain.


FishMonger
Veteran / Moderator

Jan 25, 2015, 9:03 AM

Post #3 of 3 (2709 views)
Re: [edrew04] creating wrapper ksh in perl [In reply to] Can't Post

I see that you cross posted this on perlmonks.

http://www.perlmonks.org/?node_id=1114420

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives